Comments (6)
Honestly 1 decisecond is 100 milliseconds, so TIMERFMS ds*100 is same as TIMERFD just multiply the amount of Decisecond by 100 to make it timerfd, but if you still insist for a function;
[FUNCTION TIMERFD]
IF (<dARGV> < 2)
TIMERFMS <ARGS> //Return default errors, if ARGS has 1 argument.
RETURN 0
ENDIF
TIMERFMS <EVAL <STRTOKEN '<ARGS>', 1, ','> * 100>,<STRTOKEN '<ARGS>', 2-, ','>
from source-x.
The thing is not that its not possible to do otherwise, but everytime there is a topic about timerMS or timerfMS, most of the veterans suggest not using MS, because its supper heavy and hungry for sphere.
However thanks for alternative.
from source-x.
Technically using TIMERF TIMERFD or TIMERFMS has no difference, when you use TIMERF sphere tells that call me once in second*1000 milliseconds, so using TIMERFMS 1000 or TIMERF 1 doesn't have any difference, so yes I can add TIMERFD but it will do same thing with the one I gave you as a script, because I just gonna set the timeout same as the script.
You can see that the TIMERF multiplies the value you entered by 1000 to change to millisecond on;
Note: fSecond is a bool, which set to true if you use TIMERF instead of TIMERFMS
Source-X/src/game/CObjBase.cpp
Lines 2698 to 2701 in 4934125
All code:
Source-X/src/game/CObjBase.cpp
Lines 2659 to 2706 in 4934125
from source-x.
If you still think TIMERFD should exists, I could add it for just as symbolically, but honestly it will have no effect on performance at all.
from source-x.
Well Im not skilled enough to understand the code you posted, but from the explanation it makes sense. I was just wondering why we have been warned to not use the MS stuff, if its basically the same.
I'll use your function then, thanks.
from source-x.
TIMERD is there for historical purposes, i guess it won't harm to have TIMERFD for consistency, even if it's not so needed.
In any case, as said timerf used timerfms and multiplies the value. We might have said to avoid using timer(f)ms too often with too small delays to avoid overload, but timer(f)ms isn't bad per se
from source-x.
Related Issues (20)
- ADDCOMP, DELCOMP HOT 8
- ISSTUCK HOT 15
- CAN_I_SCRIPTEDMORE
- PLEVEL commands not working on GM account HOT 2
- Problems with Curse Weapon magic in i_magic_necromancer
- Problems with pain_spike magic in i_magic_necromancer
- ISVALID female gump HOT 7
- LIST and math HOT 2
- can_i_damageable and ItemHitpointsUpdate, do not update status HOT 2
- Giant Spiders drops i_spider_web in sleeping sector HOT 8
- @PersonalSpace trigger malfunctioning HOT 8
- ON=@FollowersUpdate not working as intended? HOT 3
- SkillClass on NPCS HOT 1
- spellflag_no_elementalengine & SPELLFLAG_FIELD_RANDOMDECAY
- @statchange dosnt work.
- ON=@DAMAGE together with CAN_I_DAMAGEABLE HOT 9
- Roomdef not being fully saved to the file HOT 1
- (opinion) Retrocompatibility is a lie HOT 4
- Remove internal message for fail mining spots HOT 13
- FLAGS & too long numbers (bug is back) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from source-x.