Skip to content

Commit b896687

Browse files
Add (unfinished) SDL_timer.inc
For example code
1 parent 88254b9 commit b896687

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

units/SDL3.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ interface
8888
{$I SDL_surface.inc} // 3.1.6-prev
8989
{$I SDL_video.inc} // 3.1.6-prev
9090
{$I SDL_render.inc} // 3.1.6-prev
91+
{$I SDL_timer.inc} // 3.1.6-prev (unfinished)
9192

9293

9394
implementation

units/SDL_timer.inc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
This file is part of:
3+
4+
SDL3 for Pascal
5+
(https://github.com/PascalGameDevelopment/SDL3-for-Pascal)
6+
SPDX-License-Identifier: Zlib
7+
}
8+
9+
{*
10+
* Wait a specified number of milliseconds before returning.
11+
*
12+
* This function waits a specified number of milliseconds before returning. It
13+
* waits at least the specified time, but possibly longer due to OS
14+
* scheduling.
15+
*
16+
* \param ms the number of milliseconds to delay.
17+
*
18+
* \threadsafety It is safe to call this function from any thread.
19+
*
20+
* \since This function is available since SDL 3.1.3.
21+
}
22+
procedure SDL_Delay(ms: cuint32); cdecl;
23+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Delay' {$ENDIF} {$ENDIF};
24+
25+
{*
26+
* Wait a specified number of nanoseconds before returning.
27+
*
28+
* This function waits a specified number of nanoseconds before returning. It
29+
* waits at least the specified time, but possibly longer due to OS
30+
* scheduling.
31+
*
32+
* \param ns the number of nanoseconds to delay.
33+
*
34+
* \threadsafety It is safe to call this function from any thread.
35+
*
36+
* \since This function is available since SDL 3.1.3.
37+
}
38+
procedure SDL_DelayNS(ns: cuint64); cdecl;
39+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_DelayNS' {$ENDIF} {$ENDIF};
40+

0 commit comments

Comments
 (0)