Skip to content

Commit

Permalink
Add explicit long int conversion in msleep function
Browse files Browse the repository at this point in the history
  • Loading branch information
Alain FLAISCHER committed May 24, 2017
1 parent baa90fc commit d317140
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 = ms / MS_PER_SECOND,
.tv_nsec = (ms % MS_PER_SECOND) * NS_PER_MS
.tv_sec = (long int)(ms / MS_PER_SECOND),
.tv_nsec = (long int)((ms % MS_PER_SECOND) * NS_PER_MS)
};

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

0 comments on commit d317140

Please sign in to comment.