Exemple #1
0
        public static DateTimeEventArgs GetDateTime(int timeout)
        {
            _getDateTimeSync.Reset();
            _getDateTimeResult = null;
            DateTimeChanged   += GetDateTimeCallback;
            RequestDateTime();
#if NETMF
            _getDateTimeSync.WaitOne(timeout, true);
#else
            _getDateTimeSync.WaitOne(timeout);
#endif
            DateTimeChanged -= GetDateTimeCallback;
            return(_getDateTimeResult);
        }
Exemple #2
0
 private static void GetDateTimeCallback(DateTimeEventArgs e)
 {
     _getDateTimeResult = e;
     _getDateTimeSync.Set();
 }
 private static void GetDateTimeCallback(DateTimeEventArgs e)
 {
     _getDateTimeResult = e;
     _getDateTimeSync.Set();
 }
 public static DateTimeEventArgs GetDateTime(int timeout)
 {
     _getDateTimeSync.Reset();
     _getDateTimeResult = null;
     DateTimeChanged += GetDateTimeCallback;
     RequestDateTime();
     #if NETMF
     _getDateTimeSync.WaitOne(timeout, true);
     #else
     _getDateTimeSync.WaitOne(timeout);
     #endif
     DateTimeChanged -= GetDateTimeCallback;
     return _getDateTimeResult;
 }