Пример #1
0
 public static void FlushLogsIfNeeded()
 {
     // Only trigger flush on a time basis
     s_PendingTimer.trigger(delegate()
     {
         // Log in a thread to not clog the main thread with file writing
         Async.runInThread(delegate(Async t)
         {
             FlushLogsNow();
         });
     });
 }
Пример #2
0
 public static void FlushHistoryIfNeeded()
 {
     s_HistoryTimer.trigger(delegate()
     {
         Async.runInThread(delegate(Async t)
         {
             var lines = Nanome.Core.Communication.history();
             var path  = Nanome.Core.Logs.localHistoryDetailsPath();
             Nanome.Core.File.writeFileLines(path, lines);
         });
     });
 }