The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sphere Timer
Author Message
Darkyhood
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Mar 2012
Reputation: 0



Post: #1
Sphere Timer
Noticed that timer = 60 a little more than 60 seconds.
I made a log every second (attached file) and we can see:
Code:
12:07 Timer = 1
12:08 Timer = 1
12:09 Timer = 1
12:10 Timer = 1
12:12 Timer = 1
...
12:38 Timer = 1
12:40 Timer = 1
...
13:00 Timer = 1
13:02 Timer = 1
...
13:33 Timer = 1
13:35 Timer = 1
Timer jumps few times per minute, it turns out that the timer=60 is more than 1 minute for 2-3 seconds. Per hour is 2-3 minutes...

Is it possible to somehow fix it?

P.S. Sorry for my English.


Attached File(s)
.txt  log.txt (Size: 6.74 KB / Downloads: 8)
04-11-2013 08:37 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #2
RE: Sphere Timer
timers can be affected by sector sleep, you can use timerf or f_onserver_timer for time-critical things.
(This post was last modified: 04-11-2013 01:57 PM by Shaklaban.)
04-11-2013 01:56 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Darkyhood
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Mar 2012
Reputation: 0



Post: #3
RE: Sphere Timer
I think sector sleep affect only for NPC. I just try make premium account timer. I create item, equip it to player and saw that timer is not same like real time seconds.

If is not possible to fix I can try found other ways, like you said (timerf or f_onserver_timer) maybe I can use serv.time as well.

Anyway thanks for helping.
(This post was last modified: 04-12-2013 03:13 AM by Darkyhood.)
04-12-2013 03:12 AM
Find all posts by this user Like Post Quote this message in a reply
Wap
Journeyman
*

Posts: 138
Likes Given: 6
Likes Received: 7 in 6 posts
Joined: Mar 2012
Reputation: 3

UORPG.net

Post: #4
RE: Sphere Timer
I have a system object on the shard market(sector is always active), on that continuosly working:
TIMERD=1 -->

ON=@TIMER
SERV.RTICKS check, if changed ---> fire SERVER_TIMERS function.
TIMERD=1

I know no other way to fire some code exactly on time X, or after X seconds.

But for making Premium Account timer, you can just save SERV.RTICKS time, then premium account is activated, and check it regularly(on login, any other actions...).
04-12-2013 05:43 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)