PowerState.Uptime Equivalent

With NetMF I could use PowerState.Uptime to work out how long the CPU had been active for. I don’t want to rely on snapshotting the datetime as it is set externally at a point via the uart and could change.

Is there a simple method or property (even if I need to do some calculation)?

At this time, there is no such managed equivalent. We will keep it in mind though.

If you can write some native code though, you can get the default instance of TinyCLR_NativeTime_Controller and call GetNativeTime on it. That doesn’t track CPU activity but the current time since the core was started.

Thanks John. Not sure how the native code works yet but I’ll investigate.

It may be a bit of overkill just for the uptime, but if you do really need it, take a look at http://docs.ghielectronics.com/software/tinyclr/native/intro.html to get started.