开发者

How to set Linux/Mac computer clock with C#/Mono?

how can I programmatically set the hardware computer clock under Linux and Mac in C# with the Mono CLR?

EDIT:

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/


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜