Time code - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Time code

rohanmartin08rohanmartin08 Posts: 1Member
IS the following code correct?

mscount++; /* Generate 1ms Delay*/
if(mscount>=1000)
{
mscount=0;
Seconds++;



if(Seconds>=60)
{
Seconds=0;
Minutes++;



if(Minutes>=60)
{
Minutes=0;
Hours++;



if(Hours>=13)
{
Hours=1;

}
}
}
}

Comments

Sign In or Register to comment.