MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / run

Method run

source/kernel/ktimer.cpp:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "boxedwine.h"
20
21bool KRunTimer::run() {
22 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(timer->waitCond);
23 timer->numberOfExpirations++;
24 BOXEDWINE_CONDITION_SIGNAL_ALL(timer->waitCond);
25 if (!timer->microInterval) {
26 return true; // remove timer
27 } else {
28 U64 now = KSystem::getSystemTimeAsMicroSeconds();
29 timer->microNextTimer = now + timer->microInterval;
30 this->millies = (U32)(timer->microInterval / 1000) + KSystem::getMilliesSinceStart();
31 return false; // keep timer going
32 }
33}
34
35KTimerCallback::~KTimerCallback() {
36 if (this->active) {

Callers 3

runTestCPUFunction · 0.45
runTimersFunction · 0.45
runThreadSliceFunction · 0.45

Calls

no outgoing calls

Tested by 1

runTestCPUFunction · 0.36