Beispiel #1
0
// Returns the number of ticks until time.
static u4_t delta_time(u8_t time) {
	  u8_t t = hal_ticks( );
	  s4_t d = time - t;
	  if (d<=1) { return 0; }
	  else {
		return (u4_t)(time - hal_ticks());
	  }
}
Beispiel #2
0
// Returns the number of ticks until time. Negative values indicate that
// time has already passed.
static s4_t delta_time(u4_t time) {
    return (s4_t)(time - hal_ticks());
}
Beispiel #3
0
ostime_t os_getTime () {
    return hal_ticks();
}