Skip to content

Commit a17e0b7

Browse files
committed
(#6) Updated macOS implementation to use milliseconds
1 parent d66e651 commit a17e0b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/highlightwindow_macos.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "highlightwindow.h"
22
#import <Cocoa/Cocoa.h>
33

4-
void showHighlightWindow(int x, int y, int width, int height, int duration, float opacity) {
4+
void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) {
55
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
66
[NSApplication sharedApplication];
77

@@ -14,7 +14,7 @@ void showHighlightWindow(int x, int y, int width, int height, int duration, floa
1414
[window setAlphaValue:opacity];
1515
[window orderFrontRegardless];
1616

17-
[NSTimer scheduledTimerWithTimeInterval: duration
17+
[NSTimer scheduledTimerWithTimeInterval: duration / 1000.0
1818
repeats: NO
1919
block: ^(NSTimer * timer){
2020
[NSApp stop:0];

0 commit comments

Comments
 (0)