added qse_getmtime() and qse_mtime_t to represent time in milliseconds

This commit is contained in:
2019-03-12 08:22:36 +00:00
parent c5c9c47e86
commit d41f8e75e0
2 changed files with 18 additions and 0 deletions

View File

@ -119,6 +119,8 @@ struct qse_btime_t
int gmtoff;
};
/* number of milliseconds since the Epoch (00:00:00 UTC, Jan 1, 1970) */
typedef qse_long_t qse_mtime_t;
#if defined(QSE_HAVE_INLINE)
static QSE_INLINE void qse_inittime(qse_ntime_t* x, qse_long_t s, qse_int32_t nsec)
@ -161,6 +163,13 @@ QSE_EXPORT int qse_gettime (
qse_ntime_t* nt
);
/**
* The qse_getmtime() function gets the current time in milliseconds.
*/
QSE_EXPORT int qse_getmtime (
qse_mtime_t* mt
);
/**
* The qse_settime() function sets the current time.
*/
@ -243,6 +252,7 @@ QSE_EXPORT int qse_wcs_to_ntime (
# define qse_str_to_ntime(text,ntime) qse_wcs_to_ntime(text,ntime)
#endif
#if defined(__cplusplus)
}
#endif