MAINCNTL and MAINCNTH are read-only integer system variables which indicate the number of 'frames' (1/60 second periods) which have elapsed since the system started. Note that this means the amount of time since clicking the "Write Program" button on the Petit Computer main menu screen, or the amount of time since clicking "Run" on the Program List (Gallery) screen, _not_ the amount of time since Petit Computer itself was started.

The largest integer that can be represented in a single value is 524287, which represents only 2 hours 25 minutes 38 and 7/60 seconds, so the total elapsed time is stored in two values: this means the counter will not "roll over" to zero for over 145 years!

The number of frames elapsed is given by the expression MAINCNTH*524288+MAINCNTL.