Hello guys,
there's a litte problem I want to fix.
I'm still working on an unstuck plugin and implement a cooldown.
Nothing complicated a really simple way to prevent abuse.
What I need from you?
The plugin is writtin in C++ and based on PaiNs unstuck tool.
I only want to get a timestamp and save it as integer not in string. Not more...
Tried so much ways but it wont work.
Could anyone help me?
Solved Getting the timestamp (C#)
Discussion in 'Rust Development' started by xFakE, Sep 8, 2015.
-
var time = DateTime.UtcNow.ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds;
-
Wulf Community Admin
Assuming you mean C#, not C++?
-
Sorry, this was my fault.
Of cause i meant C#.
THANK YOU for you fast reply!Last edited by a moderator: Sep 8, 2015 -
Easier still:
long x= DateTime.Now.ToBinary();
DateTime d= DateTime.FromBinary(x);