GetTimestamp
int GetTimestamp()Description
Returns the current Unix timestamp as an integer.
The Unix timestamp represents the number of seconds elapsed since January 1, 1970 (UTC).
Can be used to seed the random number generator or to measure elapsed time between two calls.
Returns
Current Unix timestamp as int.
Example
void main()
{
int ts = GetTimestamp(); // e.g. 1746700507
srand(GetTimestamp()); // Seed rand() with current time
int start = GetTimestamp();
Sleep(2000);
int elapsed = GetTimestamp() - start; // elapsed ≈ 2
}