예제 #1
0
파일: Utils.cs 프로젝트: mikhp/greatmaps
      public static void UpdateTime(DateTime gpsTime)
      {
          Win32.SYSTEMTIME s = new Win32.SYSTEMTIME();
          s.Year = (short)gpsTime.Year;
          s.Month = (short)gpsTime.Month;
          s.DayOfWeek = (short)gpsTime.DayOfWeek;
          s.Day = (short)gpsTime.Day;
          s.Hour = (short)gpsTime.Hour;
          s.Minute = (short)gpsTime.Minute;
          s.Second = (short)gpsTime.Second;
          s.Milliseconds = (short)gpsTime.Millisecond;

          bool t = Win32.SetSystemTime(ref s);
          Debug.WriteLine("SetSystemTime: " + t);
      }
예제 #2
0
파일: Utils.cs 프로젝트: fr830/Greatmaps-1
        public static void UpdateTime(DateTime gpsTime)
        {
            Win32.SYSTEMTIME s = new Win32.SYSTEMTIME();
            s.Year         = (short)gpsTime.Year;
            s.Month        = (short)gpsTime.Month;
            s.DayOfWeek    = (short)gpsTime.DayOfWeek;
            s.Day          = (short)gpsTime.Day;
            s.Hour         = (short)gpsTime.Hour;
            s.Minute       = (short)gpsTime.Minute;
            s.Second       = (short)gpsTime.Second;
            s.Milliseconds = (short)gpsTime.Millisecond;

            bool t = Win32.SetSystemTime(ref s);

            Debug.WriteLine("SetSystemTime: " + t);
        }