diff options
Diffstat (limited to 'Linux_x86/phOsalNfc_Timer.c')
-rw-r--r-- | Linux_x86/phOsalNfc_Timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Linux_x86/phOsalNfc_Timer.c b/Linux_x86/phOsalNfc_Timer.c index e448f20..da39586 100644 --- a/Linux_x86/phOsalNfc_Timer.c +++ b/Linux_x86/phOsalNfc_Timer.c @@ -222,8 +222,8 @@ void phOsalNfc_Timer_Start(uint32_t TimerId, its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0; - its.it_value.tv_sec = (RegTimeCnt * NSECS) / 1000000000; - its.it_value.tv_nsec = ((long)RegTimeCnt * NSECS) % 1000000000; + its.it_value.tv_sec = RegTimeCnt / 1000; + its.it_value.tv_nsec = 1000000 * (RegTimeCnt % 1000); timers[TimerId].callback = Application_callback; timers[TimerId].pContext = pContext; |