Skip to content

Commit d66e651

Browse files
committed
(#6) Updated Windows implementation to use milliseconds
1 parent 2c1290f commit d66e651

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/highlightwindow_win32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
1212

13-
void showHighlightWindow(int x, int y, int width, int height, int duration, float opacity) {
13+
void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) {
1414
// Register the window class.
1515
const wchar_t CLASS_NAME[] = L"Highlight Window Class";
1616

@@ -44,7 +44,7 @@ void showHighlightWindow(int x, int y, int width, int height, int duration, floa
4444
return;
4545
}
4646

47-
SetTimer(hwnd, ID_CLOSE_TIMER, duration * 1000, NULL);
47+
SetTimer(hwnd, ID_CLOSE_TIMER, duration, NULL);
4848
ShowWindow(hwnd, 1);
4949

5050
MSG msg = {0};

0 commit comments

Comments
 (0)