public bool InitLogger(Drive ReferenceDrive) { //Falls schon ein Logger lauft -> false if (singleton) { return(false); } //hier der else Teil Console.WriteLine("Starte TimerInit"); // InitTrackLogger example = new InitTrackLogger(); TrackLogger TrackLog1 = new TrackLogger(ReferenceDrive); //timer = new System.Threading.Timer(TrackLog1.writeEntry, null, 150, 85); //***Alternative Logger*** //Logger akitiveren TrackLogger.LogYes = true; Thread SimpleTrackLog = new Thread(new ThreadStart(TrackLog1.runLogger)); SimpleTrackLog.Start(); //****** return(true); }
public void StartTimer(TrackLogger TrackReference) { Console.WriteLine("Timer wird erstellt"); timer = new System.Threading.Timer(TrackReference.writeEntry, null, 100, 250); Thread.Sleep(8000); }