Macaw OS C reference

Function deltatime

#include <macaw.h>
double deltatime(void);

Tells you how long it's been since your program's last _update, so things can move at the same speed however fast the frames come. Multiply a speed in pixels a second by it to get how far to move this frame: x += 60 * deltatime();. A stall, such as a busy frame or a dialog, counts as at most a tenth of a second, so nothing jumps a long way.

Parameters

It takes nothing.

Returns double

The seconds since the last _update, from 0 to 0.1 (a sixtieth of a second before the first one).

In Time, with now.