[sys_time] fix get_sys_time_float function

fractional part was wrong
This commit is contained in:
Gautier Hattenberger
2014-06-03 15:42:22 +02:00
parent adc3c8749b
commit e8cda70c92
+1 -1
View File
@@ -121,7 +121,7 @@ static inline bool_t sys_time_check_and_ack_timer(tid_t id) {
* @return current system time as float
*/
static inline float get_sys_time_float(void) {
return (float)(sys_time.nb_sec + sys_time.nb_sec_rem * sys_time.resolution_cpu_ticks);
return (float)(sys_time.nb_sec + (float)(sys_time.nb_sec_rem) / sys_time.cpu_ticks_per_sec);
}