Updated for NWNEE 37-13
Updated for NWNEE 37-13. Updated NWNxEE. Full compile. Updated release archive.
This commit is contained in:
@@ -2,18 +2,22 @@
|
||||
/// @brief Provides various time related functions
|
||||
/// @{
|
||||
/// @file nwnx_time.nss
|
||||
#include "nwnx"
|
||||
#include "nwnx_util"
|
||||
#include "inc_sqlite_time"
|
||||
|
||||
const string NWNX_Time = "NWNX_Time"; ///< @private
|
||||
|
||||
/// @brief Returns the current date.
|
||||
/// @deprecated Use SQLite functions (see inc_sqlite_time). This will be removed in future NWNX releases.
|
||||
/// @return The date in the format (mm/dd/yyyy).
|
||||
string NWNX_Time_GetSystemDate();
|
||||
|
||||
/// @brief Returns current time.
|
||||
/// @deprecated Use SQLite functions (see inc_sqlite_time). This will be removed in future NWNX releases.
|
||||
/// @return The current time in the format (24:mm:ss).
|
||||
string NWNX_Time_GetSystemTime();
|
||||
|
||||
/// @deprecated Use SQLite functions (see inc_sqlite_time). This will be removed in future NWNX releases.
|
||||
/// @return Returns the number of seconds since midnight on January 1, 1970.
|
||||
int NWNX_Time_GetTimeStamp();
|
||||
|
||||
@@ -24,6 +28,7 @@ struct NWNX_Time_HighResTimestamp
|
||||
int microseconds; ///< Microseconds
|
||||
};
|
||||
|
||||
/// @deprecated Use NWNX_Util_GetHighResTimeStamp(). This will be removed in future NWNX releases.
|
||||
/// @return Returns the number of microseconds since midnight on January 1, 1970.
|
||||
struct NWNX_Time_HighResTimestamp NWNX_Time_GetHighResTimeStamp();
|
||||
|
||||
@@ -31,33 +36,28 @@ struct NWNX_Time_HighResTimestamp NWNX_Time_GetHighResTimeStamp();
|
||||
|
||||
string NWNX_Time_GetSystemDate()
|
||||
{
|
||||
string sFunc = "GetSystemDate";
|
||||
NWNX_CallFunction(NWNX_Time, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Time, sFunc);
|
||||
WriteTimestampedLogEntry("WARNING: NWNX_Time is deprecated. You should migrate to SQLite based functions (see inc_sqlite_time).");
|
||||
return SQLite_GetSystemDate();
|
||||
}
|
||||
|
||||
string NWNX_Time_GetSystemTime()
|
||||
{
|
||||
string sFunc = "GetSystemTime";
|
||||
NWNX_CallFunction(NWNX_Time, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Time, sFunc);
|
||||
WriteTimestampedLogEntry("WARNING: NWNX_Time is deprecated. You should migrate to SQLite based functions (see inc_sqlite_time).");
|
||||
return SQLite_GetSystemTime();
|
||||
}
|
||||
|
||||
int NWNX_Time_GetTimeStamp()
|
||||
{
|
||||
string sFunc = "GetTimeStamp";
|
||||
|
||||
NWNX_CallFunction(NWNX_Time, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Time, sFunc);
|
||||
WriteTimestampedLogEntry("WARNING: NWNX_Time is deprecated. You should migrate to SQLite based functions (see inc_sqlite_time).");
|
||||
return SQLite_GetTimeStamp();
|
||||
}
|
||||
|
||||
struct NWNX_Time_HighResTimestamp NWNX_Time_GetHighResTimeStamp()
|
||||
{
|
||||
WriteTimestampedLogEntry("WARNING: NWNX_Time is deprecated. NWNX_Time_GetHighResTimeStamp is moving to NWNX_Util.");
|
||||
struct NWNX_Util_HighResTimestamp u = NWNX_Util_GetHighResTimeStamp();
|
||||
struct NWNX_Time_HighResTimestamp t;
|
||||
string sFunc = "GetHighResTimeStamp";
|
||||
|
||||
NWNX_CallFunction(NWNX_Time, sFunc);
|
||||
t.microseconds = NWNX_GetReturnValueInt(NWNX_Time, sFunc);
|
||||
t.seconds = NWNX_GetReturnValueInt(NWNX_Time, sFunc);
|
||||
t.seconds = u.seconds;
|
||||
t.microseconds = u.microseconds;
|
||||
return t;
|
||||
}
|
||||
|
Reference in New Issue
Block a user