Skip to content

Commit 5d37d7f

Browse files
committed
Use Milliseconds
1 parent 7a38983 commit 5d37d7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/edu/wpi/grip/core/operations/composite/SaveImageOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class SaveImageOperation implements Operation {
5252
private final FileManager fileManager;
5353
private final BytePointer imagePointer = new BytePointer();
5454
private final Stopwatch stopwatch = Stopwatch.createStarted();
55-
private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS");
55+
private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss-SSS");
5656

5757
public SaveImageOperation(InputSocket.Factory inputSocketFactory, OutputSocket.Factory outputSocketFactory, FileManager fileManager) {
5858
this.fileManager = fileManager;
@@ -89,7 +89,7 @@ public void perform() {
8989
}
9090

9191
// don't save new image until period expires
92-
if (stopwatch.elapsed(TimeUnit.NANOSECONDS) < periodSocket.getValue().get().doubleValue()*1000000000L) {
92+
if (stopwatch.elapsed(TimeUnit.MILLISECONDS) < periodSocket.getValue().get().doubleValue()*1000L) {
9393
return;
9494
}
9595
stopwatch.reset();

0 commit comments

Comments
 (0)