diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2011-01-04 21:31:17 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2011-01-04 21:31:17 +0100 |
commit | 79e46938c5d8daf164ab2d934f668fa27b32e4cf (patch) | |
tree | 407761f25bbdc3d5b2066a705dcbcf8711690242 /src/threading.c | |
parent | ed07b457b6b45ece85d367dc8b89bf3c040abd9a (diff) | |
download | lanes-79e46938c5d8daf164ab2d934f668fa27b32e4cf.tar.gz lanes-79e46938c5d8daf164ab2d934f668fa27b32e4cf.tar.bz2 lanes-79e46938c5d8daf164ab2d934f668fa27b32e4cf.zip |
Take all code from Asko Kauppi's SVN server, and push it here so that the github repository becomes the official Lanes source codebase.
Note that Asko's SVN server holds version 2.0.9, whereas this is version 2.0.10, but I don't see any real need to update SVN if it is to become deprecated.
Next steps:
- upgrade the rockspec to the latest version
- make the html help available online somewhere
Signed-off-by: Benoit Germain <bnt.germain@gmail.com>
Diffstat (limited to 'src/threading.c')
-rw-r--r-- | src/threading.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/threading.c b/src/threading.c index 68d1e41..00be243 100644 --- a/src/threading.c +++ b/src/threading.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * THREADING.C Copyright (c) 2007-08, Asko Kauppi | 2 | * THREADING.C Copyright (c) 2007-10, Asko Kauppi |
3 | * | 3 | * |
4 | * Lua Lanes OS threading specific code. | 4 | * Lua Lanes OS threading specific code. |
5 | * | 5 | * |
@@ -10,7 +10,7 @@ | |||
10 | /* | 10 | /* |
11 | =============================================================================== | 11 | =============================================================================== |
12 | 12 | ||
13 | Copyright (C) 2007-08 Asko Kauppi <akauppi@gmail.com> | 13 | Copyright (C) 2007-10 Asko Kauppi <akauppi@gmail.com> |
14 | 14 | ||
15 | Permission is hereby granted, free of charge, to any person obtaining a copy | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy |
16 | of this software and associated documentation files (the "Software"), to deal | 16 | of this software and associated documentation files (the "Software"), to deal |
@@ -178,6 +178,11 @@ static void prepare_timeout( struct timespec *ts, time_d abs_secs ) { | |||
178 | 178 | ||
179 | ts->tv_sec= floor( abs_secs ); | 179 | ts->tv_sec= floor( abs_secs ); |
180 | ts->tv_nsec= ((long)((abs_secs - ts->tv_sec) * 1000.0 +0.5)) * 1000000UL; // 1ms = 1000000ns | 180 | ts->tv_nsec= ((long)((abs_secs - ts->tv_sec) * 1000.0 +0.5)) * 1000000UL; // 1ms = 1000000ns |
181 | if (ts->tv_nsec == 1000000000UL) | ||
182 | { | ||
183 | ts->tv_nsec = 0; | ||
184 | ts->tv_sec = ts->tv_sec + 1; | ||
185 | } | ||
181 | } | 186 | } |
182 | #endif | 187 | #endif |
183 | 188 | ||