MCPcopy Index your code
hub / github.com/OpenDUNE/OpenDUNE / Timer_SetTimer

Function Timer_SetTimer

src/timer.c:356–371  ·  view source on GitHub ↗

* Set timers on and off. * * @param timer The timer to switch. * @param set True sets the timer on, false sets it off. * @return True if timer was set, false if it was not set. */

Source from the content-addressed store, hash-verified

354 * @return True if timer was set, false if it was not set.
355 */
356bool Timer_SetTimer(TimerType timer, bool set)
357{
358 uint8 t;
359 bool ret;
360
361 t = (1 << (timer - 1));
362 ret = (s_timersActive & t) != 0;
363
364 if (set) {
365 s_timersActive |= t;
366 } else {
367 s_timersActive &= ~t;
368 }
369
370 return ret;
371}
372
373/**
374 * Sleep for an amount of ticks.

Callers 5

Structure_BuildObjectFunction · 0.85
GameLoop_MainFunction · 0.85
GUI_ChangeSelectionTypeFunction · 0.85
GUI_Widget_Mentat_ClickFunction · 0.85
GUI_Widget_Options_ClickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected