public static MyTimer GetInstance() { if (INSTANCE == null) { lock (key) { if (INSTANCE == null) { INSTANCE = new MyTimer(); } } } return(INSTANCE); }
static void Main(string[] args) { Console.WriteLine(MyTimer.GetInstance().GetTime()); }