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(); }); }); }
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); }); }); }