Emulating PHP time Function in C#