[Freemint-list] [MiNT] MiNTlib timing related functions behavior/performance (Thorsten Otto)

Thorsten Otto admin at tho-otto.de
Tue Jun 27 09:03:06 MSD 2017


On Dienstag, 27. Juni 2017 00:34:33 CEST Miro Kropáček wrote:
> You're missing one important point -- sometimes it's not obvious
> gettimeofday() is *used* because it's buried somewhere deep in the code. So
> unless you start grep'ing for this particular function or do profiling, you
> may end up thinking that basically that piece of software is too much for
> our small cute platform and move on. With the warning you'd see "Ah all
> right, I must make sure this isn't called in the time critical section!".

That's a strange argument. If you have to grep for it to know that it is used, 
then you are obviously compiling someone else package, and even if you see the 
message, i doubt you will go ahead and analyze the code whether it is called 
in some critical section. So that message will be ignored anyway, and only 
annoy you while developing, because you know you need that function.

And you are missing another importing point: the only way to produce a warning 
only from mintlib, without changing gcc, is to declare the function as 
deprecated. Why would you do that for a function that belongs to the posix 
standard?




More information about the Freemint-list mailing list