java - How to lock if condition until both conditions are true? -
I have a program that parses the data of the last one hour from the log file and places it in another file. I need to keep walking status until the program gets an hourly data. One hour data will be written by the server in the log file.
How do I stop the situation until one hour of data is reached?
Reversed lines fileRed reverse = new ReversedLinesFileReader (file); Printwriter author = new printritter (f2 + "/" + filename 1); ; String line; While ((line = reverse.readline ()) = faucet {list & lt; String & gt; StringList = Arrays.asList (line); If (line condition (static. SPEEDO)) {timeFromLine = getTimeFromLine (line); TimeFromSystem = getSystemTime (); Timegap = propertyreader.jetproperty value ("timegap"); Format.setTimeZone (TimeZone.getTimeZone ("GMT")); Timeline = format.parse (timeframeline); TimeSystem = format.parse (timeFromSystem); TimeGapDate = format.parse (timeGap); StartTimeLong = timeSystem.getTime (); TimeGapLong = timeGapDate.getTime (); EndTimeLong = startTimeLong-timeGapLong; Date D = New Date (Endime Long); EndTimeString = format.format (d); EndTimeDate1 = format.parse (endTimeString); If (Timeline.First (TimeSystem) & amp; amp; amp;; Timeline, After (endTimeDate1)). Printline (line); }}} Writer.close (); Reverse.close (); Thanks to Thomas, I used the interval of voting interval to run the code.
last long voting time = 5000
Comments
Post a Comment