Timer code

Can someone give me an example of a timer that counts from 0 ?

Thanks.