Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2022-10-07 14:20:31 -04:00
parent 0bbbd2678a
commit 128e7e59a4
7060 changed files with 4955665 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include "nwnx_time"
void main()
{
WriteTimestampedLogEntry("NWNX_Time unit test begin..");
struct NWNX_Time_HighResTimestamp t1 = NWNX_Time_GetHighResTimeStamp();
// waste some time..
DestroyObject(CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()));
DestroyObject(CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()));
DestroyObject(CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()));
DestroyObject(CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation()));
struct NWNX_Time_HighResTimestamp t2 = NWNX_Time_GetHighResTimeStamp();
if (t1.microseconds == t2.microseconds) // yeah, chance of again triggering
WriteTimestampedLogEntry("GetHighResTimeStamp failed");
else
WriteTimestampedLogEntry("GetHighResTimeStamp succeed");
WriteTimestampedLogEntry("t1.seconds: " + IntToString(t1.seconds) + "; " +
"t1.microseconds: " + IntToString(t1.microseconds) + "; " +
"t2.seconds: " + IntToString(t2.seconds) + "; " +
"t2.microseconds: " + IntToString(t2.microseconds) + "; ");
}