FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/osl/os_tim_fl.c @ 458:705030e1e8b2
os_tim_fl.c: os_RecoverTick() done
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 23 Jun 2014 05:44:03 +0000 |
parents | 103b06ef644a |
children | 38afaeb194ea |
comparison
equal
deleted
inserted
replaced
457:103b06ef644a | 458:705030e1e8b2 |
---|---|
93 TimerTable[MaxSimultaneousTimer].entry.status = 0; | 93 TimerTable[MaxSimultaneousTimer].entry.status = 0; |
94 TimerTable[MaxSimultaneousTimer].next_t_handle = 0; | 94 TimerTable[MaxSimultaneousTimer].next_t_handle = 0; |
95 t_running = 0; | 95 t_running = 0; |
96 return(OS_OK); | 96 return(OS_OK); |
97 } | 97 } |
98 | |
99 GLOBAL LONG | |
100 os_RecoverTick(OS_TICK ticks) | |
101 { | |
102 UNSIGNED current_system_clock; | |
103 | |
104 current_system_clock = NU_Retrieve_Clock(); | |
105 NU_Set_Clock(current_system_clock + ticks); | |
106 if (TMD_Timer_State == TM_ACTIVE) { | |
107 if (TMD_Timer <= ticks) { | |
108 TMD_Timer_State = TM_EXPIRED; | |
109 TMD_Timer = 0; | |
110 } else | |
111 TMD_Timer -= ticks; | |
112 } | |
113 return(OS_OK); | |
114 } |