(svn r23619) -Add: ScriptDate::GetSystemTime, to get the seconds since 1 Jan 1970 of the real system (GameScript only)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
/** @file script_date.cpp Implementation of ScriptDate. */
|
||||
|
||||
#include <time.h>
|
||||
#include "../../stdafx.h"
|
||||
#include "script_date.hpp"
|
||||
#include "../../date_func.h"
|
||||
@@ -53,3 +54,10 @@
|
||||
|
||||
return ::ConvertYMDToDate(year, month - 1, day_of_month);
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptDate::GetSystemTime()
|
||||
{
|
||||
time_t t;
|
||||
time(&t);
|
||||
return t;
|
||||
}
|
||||
|
Reference in New Issue
Block a user