Hi Owen,

While trying to get rid of G_MICROSEC I'll noticed the following:

> After all, I think 1e6 is a valid integer constant in C. (gcc accepts it
> anyways.)

It isn't an integer constant, but a float one (I checked it in K&R). You
mostly do not notice though, because gcc will optimize it, but try 
"a = b % 1e6". That won't work.

Two options:

1) Let the user use 1e6 hoping that the compiler will get things right. The
   user will most certainly not need '%'.
2) Define G_MICROSECS_PER_SEC or G_MICRO or maybe even G_MEGA to be 100000.

Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi ira uka de           |     är himmlen så förunderligt blå   |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]