Reputation: 984
how can I programmatically set the hardware computer clock under Linux and Mac in C# with the Mono CLR?
I created a C# library to do this, so if everyone else need this function, grab it here:
https://github.com/mc-kay/sharp-timetools/
Upvotes: 4
Views: 2275
Reputation: 276135
You will need to use PInvoke (documentation : http://www.mono-project.com/Interop_with_Native_Libraries) the native (c/c++) functions for this. For linux the native function / struct is listed here : How Do You Programmatically Set the Hardware Clock on Linux?
Upvotes: 2