mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 13:01:29 -10:00
This adds an API for the scripting system which allows it to load and display movie files using the standard movie player code which includes multi-threaded frame decoding.
20 lines
424 B
C++
20 lines
424 B
C++
//
|
|
//
|
|
|
|
#include "time_lib.h"
|
|
#include "io/timer.h"
|
|
#include "scripting/api/objs/time_obj.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
ADE_LIB(l_Time, "Time", "time", "Real-Time library");
|
|
|
|
ADE_FUNC(getCurrentTime, l_Time, nullptr, "Gets the current real-time timestamp.", "timestamp", "The current time")
|
|
{
|
|
return ade_set_args(L, "o", l_Timestamp.Set(timer_get_nanoseconds()));
|
|
}
|
|
|
|
} // namespace api
|
|
} // namespace scripting
|