Discussion in 'Plugin Development' started by PandazNWafflez, May 23, 2012.
I presume these are measured in ticks, 20 ticks / second on average, but am I wrong?
Yes, this is correct.
That can't be right. According to my timings.txt the fastest plugin I have takes on avg 4.4~ Minutes for the EntityDamage event. (Avg:5305)
Of course then it says, Total time 1071635 (0s)
It is 20 per second:
ticks = 20 * second
Yes so, 5305/20= 265.25 seconds on avg. That's why I'm saying it has to be wrong. If an event took 5k ticks, every player on the server would be kicked for timing out each time that event fires. And that is the fastest one listed in the file.
Do you guys have different numbers? Am I doing/calculating something improperly?
Figured it out, Looking at the source I noticed
fileTimings.println(" Total time " + totalTime + " (" + totalTime / 1000000000 + "s)");
So looks like maybe the numbers in the txt file are actually long's missing the decimal....
The actual additive line is,
totalTime += System.nanoTime() - start;
And totalTime is in fact a long. So yep, take the timings and divide by 1,000,000,000.
TLDR: These numbers aren't ticks. It's the time in nanoseconds.
timings are in nanoseconds iirc
Separate names with a comma.