/* ƒ^ƒCƒ} */

#include "../api/api.h"
#include <stdio.h>

void HariMain(void)
{
	char buf[150 * 50], s[9];
	int win, timer, sec = 0, min = 0, hour = 0;

	win = api_wopen(buf, 150, 50, -1, "ƒ^ƒCƒ}");
	timer = api_talloc();
	api_tinit(timer, 128);
	for(;;) {
		sprintf(s, "%02d:%02d:%02d", hour, min, sec);
		api_wbox(win, COLOR_C6C6C6, 28, 27, 115, 41);
		api_wputs(win, COLOR_000000, 28, 27, s);
		api_tset(timer, 100);
		if(api_getd(1) != 128) {
			break;
		}
		sec++;
		if(sec == 60) {
			sec = 0;
			min++;
			if(min == 60) {
				min = 0;
				hour++;
			}
		}
	}
	api_exit();
}
