Example #1
0
TEST(util, Overflow64Counter) {
	print("*************************************** testOverflow64Counter\r\n");

	Overflow64Counter o;
	ASSERT_EQ(0, o.update(0));
	ASSERT_EQ(10, o.update(10));

	ASSERT_EQ(20, o.update(20));

	// overflow
	ASSERT_EQ(4294967296, o.update(0));
}
Example #2
0
static void timeInfo(void) {
    scheduleMsg(logger, "chTimeNow as seconds = %d", getTimeNowSeconds());
    scheduleMsg(logger, "hal seconds = %d", halTime.get() / 168000000LL);

#if EFI_RTC || defined(__DOXYGEN__)
    int unix = rtcGetTimeUnixSec(&RTCD1) - rtcStartTime;
    scheduleMsg(logger, "unix seconds = %d", unix);
#endif
}
Example #3
0
//todo: macro to save method invocation
efitick_t getTimeNowNt(void) {
	return halTime.get();
}