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
37 /* 28-Jun-1994 sw - Note: hwt_restart() is also used in module 'drvfbi.c'. */
44 * Start hardware timer (clock ticks are 16us).
50 * smc - A pointer to the SMT Context structure.
52 * time - The time in units of 16us to load the timer with.
66 smc->hw.t_start = time ; in hwt_start()
67 smc->hw.t_stop = 0L ; in hwt_start()
71 * if time < 16 us in hwt_start()
72 * time = 16 us in hwt_start()
80 smc->hw.timer_activ = TRUE ; in hwt_start()
92 * smc - A pointer to the SMT Context structure.
102 smc->hw.timer_activ = FALSE ; in hwt_stop()
114 * smc - A pointer to the SMT Context structure.
121 smc->hw.t_start = 0 ; in hwt_init()
122 smc->hw.t_stop = 0 ; in hwt_init()
123 smc->hw.timer_activ = FALSE ; in hwt_init()
137 * smc - A pointer to the SMT Context structure.
155 * smc - A pointer to the SMT Context structure.
157 * The elapsed time since last start in units of 16us.
165 if (smc->hw.timer_activ) { in hwt_read()
171 if ((tr > smc->hw.t_start) || (is & IS_TIMINT)) { in hwt_read()
173 smc->hw.t_stop = smc->hw.t_start ; in hwt_read()
176 smc->hw.t_stop = smc->hw.t_start - tr ; in hwt_read()
178 return smc->hw.t_stop; in hwt_read()
190 * smc - A pointer to the SMT Context structure.
212 * hwt_wait_time(smc,start,duration)
218 * duration time to wait
223 void hwt_wait_time(struct s_smc *smc, u_long start, long int duration) in hwt_wait_time() argument
232 if (smc->hw.timer_activ == FALSE || in hwt_wait_time()
238 if (interval > duration) { in hwt_wait_time()
240 diff = (long)(start - hwt_quick_read(smc)) ; in hwt_wait_time()
244 } while (diff <= duration) ; in hwt_wait_time()
261 } while (diff <= duration) ; in hwt_wait_time()