Erik Hofman
878b742558
Display the time file that fails
2021-03-12 10:45:01 +01:00
Erik Hofman
9bbb615fbf
Use sg_ifstream to load the timezone database into a buffer, and access the database from that buffer. This prevents opening and closing the files too often and allows for wide character paths on Windows.
2021-03-12 09:27:15 +01:00
Erik Hofman
c9e24dcb0b
Use a vector database to get the timezone based on territorial boundaries
2021-03-11 15:59:52 +01:00
Scott Giese
e8f715c255
Maintenance: convert atoi to modern equivalence
...
Out of range results in undefined behavior in the C library.
Coverting to C++ library to avoid this risk.
2020-12-17 18:01:49 -06:00
Erik Hofman
4a660e3827
callers already compensate for year-from-1900 and mont-start-from-0
2020-10-22 10:45:06 +02:00
Erik Hofman
ce187e614a
Fix the way struct tm works, year is since 1900 (so fix a year-2000 problem...) and month is 0-11 instead of 1-12. Return a string we constructed ourselves to prevent a possible buffer overrflow. Luckily the function isn't used in active code.
2020-10-22 10:20:37 +02:00
James Turner
b258bc598e
Load time-zones from UTF-8 paths correctly
...
Use _wfopen on Windows, after converting UTF-8 paths to wchar
2020-03-13 16:48:12 +00:00
James Turner
f25c0c60a8
Use UTF8 paths in nearly all places, for OSG
...
We already request OSG to use UTF8 paths, so ensure whenever we pass
an SGPath to OSG, we use the correct conversion function.
2020-03-13 09:50:43 +00:00
Richard Harrison
9ac3c1a394
Revert GC instrumentation committed by mistake as part of "SGTimeStamp elapsedUSec"
...
This reverts commit 0b114ac5cd , reversing
changes made to 39eb9837e9 .
2019-05-27 18:49:33 +02:00
Richard Harrison
c06eabff24
Instrumented Nasal GC
2019-05-07 05:17:27 +02:00
Scott Giese
105d63a697
Simgear: LARGE_INTEGER is defined in Windows.h
...
Fixes build issues on Linux.
2019-01-20 20:35:08 -06:00
Richard Harrison
c433d29171
Win32: use high resolution timers (QueryPerformanceCounter) if available
2019-01-20 18:28:36 +01:00
Edward d'Auvergne
2ba5676eb0
SGTime: Stripped trailing '\n' from some debugging messages.
2018-05-14 21:36:54 +02:00
jean pellotier
396a7d7f09
a system clock from simgear, using std::chrono libs
...
this is to use some kind of utc time for timestamps in mp protocol,
to improve the lag correction system for mp planes, using a
"real time" mode when possible.
2018-01-20 09:15:56 +01:00
James Turner
370523d5bf
Remove sgGMTime, no longer used.
...
(And the implementation was wrong on Windows)
2017-03-17 23:25:25 +00:00
Erik Hofman
e768553a4a
Replace auto_ptr with unique_ptr
2016-12-07 11:03:49 +01:00
James Turner
5ecc1ab6f2
Simplify timing code.
...
Assumes we have timegm on Unix, and use _mkgmtime on Windows.
This means we never need to use ftime() / timeb.h
2016-11-17 21:23:56 +01:00
James Turner
f21eac8473
Building with clean SGPath API
2016-06-30 16:17:52 +01:00
James Turner
ac84115ac3
Remove obsolete member
2016-01-05 23:17:20 -06:00
James Turner
ce7f78e0ca
Remove use of ‘register’ keyword in this file.
...
Clang is now warning about this, and it’s certainly useless.
2015-02-12 16:21:15 +00:00
Thomas Geymayer
3bcd0bafd5
Lots of (mostly) doxygen fixes/cleanup.
2014-08-01 00:13:25 +02:00
James Turner
15d3c12139
Fixed for FreeBSD
...
(From Gerald Laplanche)
2014-04-03 13:42:11 +01:00
James Turner
c6330b64f6
Bugs 1207, 1301
...
Only apply the fix for time-zone offsetting on Windows, since Unix
is handling mktime differently. (Arguably we should also apply a
conversion for Unix systems, but the previous logic worked)
2014-01-03 19:51:58 +00:00
James Turner
df57a23512
#1207 : Add helper to get Unix time in GMT
...
On Windows, time() is returning a value which if offset by the
selected time-zone. Provide a variant which is always in GMT.
2014-01-01 21:03:24 +00:00
James Turner
952e2e6631
Fix unused-var warnings from Clang.
2013-10-17 20:13:49 +01:00
James Turner
42b0b9306b
Make code quieter at log-level=DEBUG.
2013-09-28 14:45:30 +01:00
James Turner
a131f44247
OS-X specific sleep helper, more stable.
2012-12-23 23:30:40 +00:00
ThorstenB
ff65b82671
Keep (deprecated) SGTime::update method for a while
...
allowing dependent projects to adapt.
2012-11-19 23:42:51 +01:00
James Turner
89d30acbc5
SGTime: use SGGeod, quieter init.
...
It's common to use SGTime to calculate the the Julian Date, without providing time-zone information. Don't warn in these cases, since the behaviour is fine.
2012-09-24 00:02:11 +01:00
James Turner
c4f6aa2f90
Remove ALUT usage from SimGear .
...
Adapt the freealut code into a WAV-file reader. As a side-effect, it would now be possible to deploy WAV files compressed with gzip, since we use ZLib's gzread functions to read from disk.
2012-08-21 13:24:35 +01:00
ThorstenB
423eba3733
Alas. Fix #pragma magic for GCC <= 4.5.
...
push/pop was introduced for GCC4.6 only - so avoid it.
Also, properly fix the fgets warning.
2012-01-09 22:18:17 +01:00
ThorstenB
49a23fdc2e
Fix final simgear GCC warnings.
2012-01-09 21:51:09 +01:00
James Turner
24c047c94e
Remove the remaining Makefiles from the code.
2011-11-01 09:28:26 +00:00
Mathias Froehlich
cc4b16b50d
Fix mac build.
2011-10-28 19:10:20 +02:00
Mathias Froehlich
cd773e4764
Add sleep implementations to SGTimeStamp.
...
Implement sleeping to an absolute timestamp
as well as sleeping for a relative time in
SGtimeStamp.
The reason for including this into SGTimeStamp
is that the timestamps internals are required to
do accurate sleeps to and absolute timestamp
for the posix timer implementation.
2011-10-28 18:45:23 +02:00
James Turner
6250f675db
Fixes for headless mode.
2011-10-23 17:56:28 +01:00
Frederic Bouvier
6ac69b604e
Fix a typo
2011-08-06 15:58:31 +02:00
James Turner
f06f25532c
Tiny HTTP client layer on top of NetChat - and CTest support for some SimGear tests.
2011-07-19 12:55:55 +01:00
ThorstenB
c033979130
screen shot fixes (issue #127 related)
...
Provide proper return status when screen grabbing.
Allow tasks to remove themselves (return task entries to the queue _before_
executig them)
2011-05-28 23:09:06 +02:00
ThorstenB
7b0c25f91e
#83 : John Denker: Set correct file modes
...
Sources shouldn't be executable.
2011-02-19 11:54:10 +01:00
James Turner
b9a34b1b05
Initial work on CMake support for SimGear.
2010-12-19 14:16:39 +00:00
ThorstenB
9f88b077ee
remove old .cvsignore files
...
Hello GIT!
2010-11-14 15:09:36 +01:00
James Turner
c4b4c0ce59
Make SGPath cache stat() information, cheers Fred
...
* cache exists/isDir/isFile in SGPath, to avoid
repeated calls.
2010-08-09 08:19:14 +01:00
James Turner
2a2e2716bd
Removal of PLIB/SG from SimGear
2010-08-07 13:55:33 +01:00
James Turner
e99c3d4705
Collapse SGGeoCoord into SGTimeZone, and switch timezone search to cartesian math.
2010-07-29 10:12:00 +01:00
fredb
3dcffc7df8
MINGW patch from Benoît Laniel
2010-01-25 14:35:45 +01:00
Tim Moore
7e7ce2f38e
Merge branch 'maint' into next
2009-05-18 00:34:06 +02:00
mfranz
1ccaf3a0bd
fix leaks
2009-05-16 16:17:39 +02:00
fredb
c2c4cad753
Compile under windows
2009-03-18 07:53:50 +01:00
mfranz
1eade74e5a
warning--
2009-03-18 07:53:50 +01:00