Get Milliseconds

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

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

Alexandre
From Brazil.

Sorry,

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

DateTime.Now.Ticks

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

1 Like