Is this bad practice? timestamp logging
#5

Quote:
Originally Posted by Garavel
Посмотреть сообщение
I'm thinking of making my log timestamps global. As in...

Код:
new y, m, d;new h,mi,s;

SetTimer("timetimer", 500, 1);

public timetimer()
{
getdate(y,m,d);gettime(h,mi,s);
}
Is this bad practice? How do YOU do this? Any chance this might be any more inaccurate than it currently is?
Yes it is, there's no need for a timer or global variables. Just append the timestamp in the string in CommandLog function itself before printing so no need for repetition. This can't be inaccurate still the timer with low interval is totally unnecessary for this task.
Reply


Messages In This Thread
Is this bad practice? timestamp logging - by Garavel - 29.01.2018, 13:31
Re: Is this bad practice? timestamp logging - by Mugala - 29.01.2018, 13:40
Re: Is this bad practice? timestamp logging - by wallee - 29.01.2018, 13:43
Re: Is this bad practice? timestamp logging - by iLearner - 29.01.2018, 15:04
Re: Is this bad practice? timestamp logging - by iKarim - 29.01.2018, 18:11

Forum Jump:


Users browsing this thread: 1 Guest(s)