1 // 2 // 3 4 #include "time_lib.h" 5 #include "io/timer.h" 6 #include "scripting/api/objs/time_obj.h" 7 8 namespace scripting { 9 namespace api { 10 11 ADE_LIB(l_Time, "Time", "time", "Real-Time library"); 12 13 ADE_FUNC(getCurrentTime, l_Time, nullptr, "Gets the current real-time timestamp.", "timestamp", "The current time") 14 { 15 return ade_set_args(L, "o", l_Timestamp.Set(timer_get_nanoseconds())); 16 } 17 18 } // namespace api 19 } // namespace scripting 20