Gamestudio Links
Zorro Links
Newest Posts
izorro's very own thread
by izorro. 09/27/23 14:42
Chart Viewer Timeframe
by mcl. 09/27/23 01:44
How many still using A8
by NeoDumont. 09/26/23 22:59
Lapsa's very own thread
by M_D. 09/26/23 15:47
Zorro MT5 Bridge
by AndrewAMD. 09/26/23 13:55
Shuffle Millionaire
by Akim. 09/25/23 09:38
Python file interface
by soulman3. 09/24/23 16:59
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (steyr), 560 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
mcl, h725, Akim, SoftKill, LBABJB
18993 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: 22
Russia\Georgia
VoroneTZ Offline
Newbie
VoroneTZ  Offline
Newbie

Joined: Jun 2008
Posts: 22
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: 22
Russia\Georgia
VoroneTZ Offline
Newbie
VoroneTZ  Offline
Newbie

Joined: Jun 2008
Posts: 22
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