Skip to content

Commit e22ee46

Browse files
author
Alain FLAISCHER
committed
Update sleep_time cast according to time.h definition
1 parent d317140 commit e22ee46

File tree

1 file changed

+2
-2
lines changed
  • sdk/userspace/include/utils

1 file changed

+2
-2
lines changed

sdk/userspace/include/utils/lcd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ extern "C" {
4646
static inline int msleep(uint64_t ms)
4747
{
4848
struct timespec sleep_time = {
49-
.tv_sec = (long int)(ms / MS_PER_SECOND),
50-
.tv_nsec = (long int)((ms % MS_PER_SECOND) * NS_PER_MS)
49+
.tv_sec = (time_t)(ms / MS_PER_SECOND),
50+
.tv_nsec = (long)((ms % MS_PER_SECOND) * NS_PER_MS)
5151
};
5252

5353
return clock_nanosleep(CLOCK_MONOTONIC, 0, &sleep_time, NULL);

0 commit comments

Comments
 (0)