Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, AndrewAMD), 770 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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: 30
Russia\Georgia
VoroneTZ Offline
Newbie
VoroneTZ  Offline
Newbie

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

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