Main Site Documentation

Get Milliseconds


Is there a similar function of Arduino millis () in the libraries GHI?

RealTime.GetTime().Milliseconds - always return value equals a 1

From Brazil.



RealTimeClock.GetTime().Milliseconds - always return value equals a 1



Gets the number of ticks that represent the date and time.

A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond.

long millis = DateTime.Now.Ticks / 10000