// should display the OS active time since last boot
// problem: win10 shows the time since the last update ???

slider1:0<0,10,1>--years
slider2:0<0,364,1>days
slider3:0<0,23,1>hours
slider4:0<0,59,1>minutes
slider5:0<0,59,1>seconds

in_pin:none
out_pin:none

@block
curtime=time_precise();

y=floor(curtime/(86164.09471726194*365.2421986));
d=floor((curtime-(y*(86164.09471726194*365.242198)))/86164.09471726194);
h=floor(curtime/3600)%24;
h2=floor(curtime/3600);
m=floor((curtime-h2*3600)/60);
s=floor(curtime-h2*3600-m*60);

slider1=y;
slider2=d;
slider3=h;
slider4=m;
slider5=s;

@gfx 0 100
gfxSize=min(gfx_w/6|0,gfx_h*2/3|0);
fontsize=gfxSize;
gfx_r=0; gfx_g=1; gfx_b=0; gfx_a=1;
gfx_setfont(1,"Arial", fontsize);
gfx_x=gfx_w/15|0; gfx_y=gfx_h/5|0;
//gfx_printf("%01d:%03d:%02d:%02d:%02d", y, d, h, m, s); // with years...
gfx_printf("%02d:%02d:%02d:%02d", d, h, m, s); // no years...
