コード例 #1
0
 public TimeDisplayer(int coordFirstX, int coordFirstY, ClockMemoryLayer layer, ConsoleColor color = ConsoleColor.White)
 {
     CoordFirstX = coordFirstX;
     CoordFirstY = coordFirstY;
     Color       = color;
     Layer       = layer;
 }
コード例 #2
0
        public static Thread CreateClockThread(int ns_per_tick, IClock clock)
        {
            var clockLayer = new ClockMemoryLayer();

            Layers.Add(clockLayer);
            var timeDisplay = new TimeDisplayer(13, 1, clockLayer);
            var timeKeeper  = new TimeKeeper(clock, timeDisplay, ns_per_tick);

            return(new Thread(new ThreadStart(() => timeKeeper.StartTime(null))));
        }