Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 03/20/23 17:51
Strange error messages in for-loops
by AndrewAMD. 03/20/23 16:21
How can convert mdl7 with UV's?
by l1ve10. 03/20/23 16:13
Asset list - Market Column
by MatPed. 03/20/23 08:44
working with Futures
by logomon. 03/18/23 23:21
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
5 registered members (AndrewAMD, YesNotes, paulk, titanicpiano14, l1ve10), 1,389 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
YesNotes, DonQuijote, cokibor, stilrz, unatrader
18906 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: 19
Russia\Georgia
VoroneTZ Offline
Newbie
VoroneTZ  Offline
Newbie

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

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