Ejemplo n.º 1
0
 static void ClientCurrentTime(object sender, CurrentTimeEventArgs e)
 {
     Logger.WriteToLog(DateTime.Now, string.Format("ClientManager.ClientCurrentTime: {0}", e.Time), Program.UserId);
     fCurentTime = true;
 }
Ejemplo n.º 2
0
        void client_CurrentTime(object sender, CurrentTimeEventArgs e)
        {
            lock (_lockObject)
            {
                DateTime accountTime = e.Time.ToLocalTime();
                accountTimeDiff = accountTime.Subtract(DateTime.Now);

                bGotAccountTime = true;

                System.Diagnostics.Trace.WriteLine("Account time updated: " + accountTime.ToString() + "  Current time: " + DateTime.Now +
                    " Diff: " + accountTimeDiff.ToString());
                //Console.WriteLine("IB Current Time: " + accountTime.ToString());

                if (_gettingReconnectData)
                {
                    _waitHandleTime = DateTime.Now;
                    _connectWaitHandle.Set();
                }
            }
        }