added StdAwk::time()
This commit is contained in:
parent
17a8a3039d
commit
02a72ee8e7
@ -147,7 +147,6 @@ StdAwk::Run* StdAwk::parse (Source& in, Source& out)
|
|||||||
{
|
{
|
||||||
Run* run = Awk::parse (in, out);
|
Run* run = Awk::parse (in, out);
|
||||||
|
|
||||||
#if defined(QSE_CHAR_IS_WCHAR)
|
|
||||||
if (this->cmgrtab_inited)
|
if (this->cmgrtab_inited)
|
||||||
{
|
{
|
||||||
// if cmgrtab has already been initialized,
|
// if cmgrtab has already been initialized,
|
||||||
@ -172,12 +171,12 @@ StdAwk::Run* StdAwk::parse (Source& in, Source& out)
|
|||||||
qse_gethtbmancbs(QSE_HTB_MANCBS_INLINE_KEY_COPIER));
|
qse_gethtbmancbs(QSE_HTB_MANCBS_INLINE_KEY_COPIER));
|
||||||
this->cmgrtab_inited = true;
|
this->cmgrtab_inited = true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
return run;
|
return run;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int StdAwk::rand (Run& run, Value& ret, const Value* args, size_t nargs,
|
int StdAwk::rand (Run& run, Value& ret, const Value* args, size_t nargs,
|
||||||
const char_t* name, size_t len)
|
const char_t* name, size_t len)
|
||||||
{
|
{
|
||||||
@ -230,8 +229,11 @@ int StdAwk::system (Run& run, Value& ret, const Value* args, size_t nargs,
|
|||||||
int StdAwk::time (Run& run, Value& ret, const Value* args, size_t nargs,
|
int StdAwk::time (Run& run, Value& ret, const Value* args, size_t nargs,
|
||||||
const char_t* name, size_t len)
|
const char_t* name, size_t len)
|
||||||
{
|
{
|
||||||
/* TODO: */
|
qse_ntime_t now;
|
||||||
return 0;
|
|
||||||
|
if (qse_gettime (&now) <= -1) now = 0;
|
||||||
|
|
||||||
|
return ret.setInt (now);
|
||||||
}
|
}
|
||||||
|
|
||||||
qse_cmgr_t* StdAwk::getcmgr (const char_t* ioname)
|
qse_cmgr_t* StdAwk::getcmgr (const char_t* ioname)
|
||||||
|
Loading…
Reference in New Issue
Block a user