Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Nymphodora, Quad), 923 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Miliseconds capturing #487125
01/24/23 07:54
01/24/23 07:54
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Hi, 3DGS developers,

I can capture system time, minute and second information with 3DGS in real-time (i.e., sys_hours, sys_minutes, sys_seconds), but I want to get it in milliseconds as well. How can I do that?

Re: Miliseconds capturing [Re: gamers] #487188
02/06/23 13:27
02/06/23 13:27
Joined: Jun 2008
Posts: 28
Russia\Georgia
VoroneTZ Offline
Newbie
VoroneTZ  Offline
Newbie

Joined: Jun 2008
Posts: 28
Russia\Georgia
Hi
You need to use WINAPI functions
here what i'm found
(dont forget about SEARCH button!)
SOURCE

Code
#include <default.c>
#include <stdio.h>
#include <windows.h>

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;


void main()
{
SYSTEMTIME st;

GetSystemTime(&st);

printf("The system time is: %02d:%02d:%02d:%02d",st.wHour, st.wMinute,st.wSecond, st.wMilliseconds);

}



Last edited by VoroneTZ; 02/07/23 07:07.
Re: Miliseconds capturing [Re: gamers] #487189
02/06/23 16:03
02/06/23 16:03
Joined: Jun 2008
Posts: 28
Russia\Georgia
VoroneTZ Offline
Newbie
VoroneTZ  Offline
Newbie

Joined: Jun 2008
Posts: 28
Russia\Georgia
also you can check samples\reactiontest.c and dtimer function

Re: Miliseconds capturing [Re: VoroneTZ] #487320
03/14/23 12:17
03/14/23 12:17
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Thank you VoroneTZ laugh

Originally Posted by VoroneTZ
Hi
You need to use WINAPI functions
here what i'm found
(dont forget about SEARCH button!)
SOURCE

Code
#include <default.c>
#include <stdio.h>
#include <windows.h>

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;


void main()
{
SYSTEMTIME st;

GetSystemTime(&st);

printf("The system time is: %02d:%02d:%02d:%02d",st.wHour, st.wMinute,st.wSecond, st.wMilliseconds);

}




Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1