Tscope5
timer01.c
////////////////////////////////////////////////////////////////////////////////
//
// __ ______
// / /_______________ ____ ___ / ____/
// / __/ ___/ ___/ __ \/ __ \/ _ \ /___ )
// / /_(__ ) /__/ /_/ / /_/ / __/ ____/ /
// \__/____/\___/\____/ .___/\___/ /_____/
// /_/
//
// timer01.c
// - Illustration of the wait functions.
////////////////////////////////////////////////////////////////////////////////
#include <tscope5.h>
int main()
{
// open a display
// normal wait function
ts5_printf(0.0, 0.0, "wait 2 seconds");
ts5_wait(2.0);
// get time since the start of the program
double tm = ts5_get_time();
ts5_printf(0.0, 0.0, "the program has been running for %f seconds now", tm);
// wait until function
tm += 2.0;
ts5_printf(0.0, 0.0, "another 2 seconds have elapsed now");
// wait for a click
ts5_draw_mouse_button(ax(0.9), ay(-0.8));
return 0;
}