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
Regarding Time Online
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #20
RE: Regarding Time Online
(08-14-2013 08:16 AM)Rattlehead Wrote:  so ur saying that running a function that fires on all connected players every few minutes would be better than a function that only fires per player every hour?

i will have to disagree on this one, for multiple reasons

1) a function that fires on a per player basis every hour, will obviously only fire every hour that they are online, rarely do multiple players login at the same time, therefore the functions wont be firing at the same time, giving each their own wiggle room as far as resource are concerned

2) since the functions fire on a per player basis, you wont have the immense resource consumption of the allclients firing, if there were say 100 players on, then when all clients is fired its going to take up a good bit of resources, tie that in with firing every X minutes, and ur looking at a resource hog every X minutes rather than just a function firing every so often per players login

3) he was only interested in every hour, so it seems counter productive to have it adding every few minutes when the minutes are of no concern to the outcome of the results, so again u would be trading resource consumption for irrelevant accuracy

i would also like to point out using TAG0 on the left side of a statement is unnecessary as you are defining the tag on the left side, and tag0 is only for statements that may have the opportunity to resolve to nothing rather than 0

firing a timerf function every hour on the player is as accurate as any other way of timing an hour, logging the current server time and counting back from it really wont be anymore accurate than the timerf, not to mention more calls to the server to get the time and adding it to a ctag that gets evaluated later, thus adding to more resource consumption

just my view, i could be wrong, but i am willing to bet that my reasoning endures Wink
it will work using both ways
but its not a good idea run a -active- timer on every player. I will prefer consume 0 resources and run a light-weight function on every player at each 5~10 minutes than set a active timerf running on every single connected account. Of course we cant run heavy functions on allclients, but in this case the function is ultra mega hyper very light and won't cause any lag, freeze or something like this even for 0.0000001ms

the accurary which I mean is count the connection time using the correct time instead counting only full hours. I can make multiple logins counting 15min + 5min + 20min and it will count 40 minutes. Doesnt reach a full hour yet, but another login using more 20 minutes will do it. Its better than counting 0 on all connections because I doesn't reach a full hour connected on none of them Big Grin

(08-15-2013 01:17 AM)Mordaunt Wrote:  Of course it works, but that's not what he wants.

He wants to reward players when they stay online for an hour, and then for each hour afterwards and only in those sessions. At least that's what I understand. So sessions less than an hour would not be rewarded, and then when they log on and complete an hour using TOTALCONNECTTIME they'd get rewarded, which isn't wanted.

At least that's how I read this whole thing
I would prefer using LASTCONNECTTIME / TOTALCONNECTTIME too, its more simple and optimized. But maybe only he would clarify the idea, since we're a bit confusing with everything lol
08-15-2013 03:26 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Regarding Time Online - pinku - 08-05-2013, 01:56 PM
RE: Regarding Time Online - Rattlehead - 08-05-2013, 02:03 PM
RE: Regarding Time Online - pinku - 08-05-2013, 02:28 PM
RE: Regarding Time Online - Rattlehead - 08-05-2013, 05:53 PM
RE: Regarding Time Online - pinku - 08-06-2013, 01:15 AM
RE: Regarding Time Online - Mordaunt - 08-06-2013, 02:44 AM
RE: Regarding Time Online - darksun84 - 08-06-2013, 03:19 AM
RE: Regarding Time Online - pinku - 08-06-2013, 04:03 AM
RE: Regarding Time Online - darksun84 - 08-06-2013, 04:08 AM
RE: Regarding Time Online - Mordaunt - 08-06-2013, 05:28 AM
RE: Regarding Time Online - pinku - 08-06-2013, 05:35 AM
RE: Regarding Time Online - Mordaunt - 08-06-2013, 06:01 AM
RE: Regarding Time Online - Rattlehead - 08-06-2013, 07:42 AM
RE: Regarding Time Online - Coruja - 08-09-2013, 04:04 PM
RE: Regarding Time Online - Rattlehead - 08-13-2013, 07:43 AM
RE: Regarding Time Online - Coruja - 08-14-2013, 04:19 AM
RE: Regarding Time Online - Rattlehead - 08-14-2013, 08:16 AM
RE: Regarding Time Online - RanXerox - 08-15-2013, 12:42 AM
RE: Regarding Time Online - Mordaunt - 08-15-2013, 01:17 AM
RE: Regarding Time Online - Coruja - 08-15-2013 03:26 AM
RE: Regarding Time Online - Rattlehead - 08-15-2013, 08:30 AM
RE: Regarding Time Online - Mordaunt - 08-15-2013, 09:07 AM
RE: Regarding Time Online - Rattlehead - 08-15-2013, 12:40 PM

Forum Jump:


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