Esempio n. 1
0
 public static TimeSwitchingCalculator GetInstance()
 {
     if (_instance == null)
     {
         _instance = new TimeSwitchingCalculator();
     }
     return(_instance);
 }
 public TrafficAnalyzer(int count, int timeOut)
 {
     roadsCount = count;
     sleepTime  = timeOut;
     calculator = TimeSwitchingCalculator.GetInstance();
 }