Blog

Time to ticks calculator

In TweeGo we use Ticks (TimeSpan) to do calculations with time and dates. I always seem to lose my Excel sheet that transforms seconds, minutes or hours to ticks. It's a simple calculation but I always forget the numbers to use. So on this rainy sunday i've created a little calculator that transforms seconds, minutes or hours to ticks. Use it anyway you like.

Some background on ticks. A single tick represents one hundred nanoseconds. There are 10,000 ticks in one millisecond. Constants on the TimeSpan struct represent these values. For example: TimeSpan.TicksPerMillisecond or TimeSpan.TicksPerSecond.

You can transform the current datetime to the number of ticks by counting the number of one hunderd nanosecond intervals that have elapsed since DateTime.MinValue (12:00:00, 01-01-0001).

More information on ticks: http://msdn.microsoft.com/en-us/library/system.datetime.ticks.aspx

0
638502229798578544
 
TicksPerMillisecond 10.000
TicksPerSecond 10.000.000
TicksPerMinute 600.000.000
TicksPerHour 36.000.000.000
TicksPerDay 864.000.000.000
Terug naar het overzicht

Comments are closed.

Twitter icon YouTube icon Facebook icon LinkedIn icon RSS icon