Lines Matching +full:duration +full:- +full:us
1 // SPDX-License-Identifier: GPL-2.0-or-later
20 * 28-Jun-1994 sw Edit v1.6.
21 * MCA: Added support for the SK-NET FDDI-FM2 adapter. The
33 /* 28-Jun-1994 sw - Note: hwt_restart() is also used in module 'drvfbi.c'. */
40 * Start hardware timer (clock ticks are 16us).
46 * smc - A pointer to the SMT Context structure.
48 * time - The time in units of 16us to load the timer with.
62 smc->hw.t_start = time ; in hwt_start()
63 smc->hw.t_stop = 0L ; in hwt_start()
67 * if time < 16 us in hwt_start()
68 * time = 16 us in hwt_start()
76 smc->hw.timer_activ = TRUE ; in hwt_start()
88 * smc - A pointer to the SMT Context structure.
98 smc->hw.timer_activ = FALSE ; in hwt_stop()
110 * smc - A pointer to the SMT Context structure.
117 smc->hw.t_start = 0 ; in hwt_init()
118 smc->hw.t_stop = 0 ; in hwt_init()
119 smc->hw.timer_activ = FALSE ; in hwt_init()
133 * smc - A pointer to the SMT Context structure.
151 * smc - A pointer to the SMT Context structure.
153 * The elapsed time since last start in units of 16us.
161 if (smc->hw.timer_activ) { in hwt_read()
167 if ((tr > smc->hw.t_start) || (is & IS_TIMINT)) { in hwt_read()
169 smc->hw.t_stop = smc->hw.t_start ; in hwt_read()
172 smc->hw.t_stop = smc->hw.t_start - tr ; in hwt_read()
174 return smc->hw.t_stop; in hwt_read()
186 * smc - A pointer to the SMT Context structure.
208 * hwt_wait_time(smc,start,duration)
214 * duration time to wait
219 void hwt_wait_time(struct s_smc *smc, u_long start, long int duration) in hwt_wait_time() argument
228 if (smc->hw.timer_activ == FALSE || in hwt_wait_time()
234 if (interval > duration) { in hwt_wait_time()
236 diff = (long)(start - hwt_quick_read(smc)) ; in hwt_wait_time()
240 } while (diff <= duration) ; in hwt_wait_time()
257 } while (diff <= duration) ; in hwt_wait_time()