Skip to content

Commit

Permalink
Update sleep_time cast according to time.h definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Alain FLAISCHER committed May 29, 2017
1 parent d317140 commit e22ee46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/userspace/include/utils/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ extern "C" {
static inline int msleep(uint64_t ms)
{
struct timespec sleep_time = {
.tv_sec = (long int)(ms / MS_PER_SECOND),
.tv_nsec = (long int)((ms % MS_PER_SECOND) * NS_PER_MS)
.tv_sec = (time_t)(ms / MS_PER_SECOND),
.tv_nsec = (long)((ms % MS_PER_SECOND) * NS_PER_MS)
};

return clock_nanosleep(CLOCK_MONOTONIC, 0, &sleep_time, NULL);
Expand Down

0 comments on commit e22ee46

Please sign in to comment.