mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Update Time documentation
This commit is contained in:
parent
f7d852b532
commit
2dabdda36a
8 changed files with 32 additions and 28 deletions
|
|
@ -160,10 +160,10 @@ double OS_Unix::get_unix_time() const {
|
|||
return (double)tv_now.tv_sec + double(tv_now.tv_usec) / 1000000;
|
||||
};
|
||||
|
||||
OS::Date OS_Unix::get_date(bool utc) const {
|
||||
OS::Date OS_Unix::get_date(bool p_utc) const {
|
||||
time_t t = time(nullptr);
|
||||
struct tm lt;
|
||||
if (utc) {
|
||||
if (p_utc) {
|
||||
gmtime_r(&t, <);
|
||||
} else {
|
||||
localtime_r(&t, <);
|
||||
|
|
@ -181,10 +181,10 @@ OS::Date OS_Unix::get_date(bool utc) const {
|
|||
return ret;
|
||||
}
|
||||
|
||||
OS::Time OS_Unix::get_time(bool utc) const {
|
||||
OS::Time OS_Unix::get_time(bool p_utc) const {
|
||||
time_t t = time(nullptr);
|
||||
struct tm lt;
|
||||
if (utc) {
|
||||
if (p_utc) {
|
||||
gmtime_r(&t, <);
|
||||
} else {
|
||||
localtime_r(&t, <);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue