Getting nanoseconds in a process

K

Keith Thompson

Golden California Girls said:
Can you apply two unary - operators in a row?

Sure, why not? But you need to separate them with at least a space so
they aren't interpreted as a "--" token. And keep in mind that unary
"-" can overflow; for example, -INT_MIN typically exceeds INT_MAX on
2's-complement systems.
 
K

Kenny McCormack

Do you think he has a Heathfield shrine that he kneels by while playing
Bette Midler's "Wind Beneath My Wings" and chanting an "indeed" mantra?

Interesting. I always thought of it as "Sheena Eastons' WbwW.

Oh well, to each his own...
 
K

Kenny McCormack

Nelu said:
Han from China - Master Troll wrote: [SNIP]

Why do you waste my time?
[...]

He's a troll; it's what he does, along with abuse, lies, and
forgeries. Arguing with him is equally a waste of your time, and
of everyone else's. Personally, I've found that the best way to
deal with him is by killfiling him.

And you'll get back to us when you've figured out how to do that, right?
 
C

CBFalconer

Nelu said:
You're right. Sorry.

No, he isn't. This was a discussion of spelling errors in a c.l.c
message, and a learning cycle. Richard the nameless is a troll.
 
C

CBFalconer

Nelu said:
Han from China - Master Troll wrote:
.... snip ...


You don't get the idea. You're giving advice on assumptions,
which you shouldn't. Clarify it with the OP first before
launching into rants and help him find the right channel for his
question based on your own rules. You should probably continue
to be a regular troll without rules than to just make an ass of
yourself by even breaking your own.

You fail to recognize that Hannybaby is simply a troll, attempting
to disturb clc. Simply plonk him. If everybody did so he would
never be answered, and the fun would stop.
 
C

CBFalconer

Kenny said:
Keith Thompson said:
Nelu said:
Han from China - Master Troll wrote:
[SNIP]

Why do you waste my time?

[...]

He's a troll; it's what he does, along with abuse, lies, and
forgeries. Arguing with him is equally a waste of your time,
and of everyone else's. Personally, I've found that the best
way to deal with him is by killfiling him.

And you'll get back to us when you've figured out how to do
that, right?

And so is McCormack (a troll). Another entry for the killfile.
 
C

CBFalconer

Anthony said:
CBFalconer said:
The word 'timespec' does not appear in the C standard. Thus no
such thing exists in the standard C language, and intimating that
it does is a pure falsity.

Where exactly did I say anything about The C Standard? Among the
very first words I wrote in this thread were, "Try this if your
using Linux:". My example code included <sys/time.h> and that's
[quite obviously IMO] the file I was referring to. Unlike you, I
misrepresented nothing; I suggest you find someone else to brand
as a liar, if you don't mind.

My original quote (above) is the entire message to which I
replied. This is Usenet. Never assume that ANY other message is
available to your reader. So you said nothing about Linux,
<sys/time.h>, etc. Use the quote mechanism, which is quite
convenient with most newsreaders.
 
C

CBFalconer

Nate said:
CBFalconer said:
Nate said:
... snip ...

I see no specification for time_t, other than arithmetic type,
so that conversion is probably accurate. However, there is no
specification whatsoever for suseconds_t.

The documentation for the Unix gettimeofday function says that
it is a signed integer type capable of representing the range
[-1,1000000], and the tv_usec member returned from gettimeofday
will have a value in that range. Given which, a cast to `long
int' should be good enough. (Just using %ld isn't enough,
though, because suseconds_t could also be a type smaller than
`long int'.)

While I assume you are quite correct for Unix, that discussion
belongs on comp.unix.programmer, not here.

There's a C question underlying it, though.

"If foo is a type, supplied by some library, which is known only
to be a signed integer capable representing the range [-1,1000000],
how can we print out a value of type foo, in a manner that will
continue to work if another version of the library should change
foo to a different type with the same property?"

Now replace foo with suseconds_t.

Good point. I guess I was over active. Sorry.
 
A

Antoninus Twink

And so is McCormack (a troll). Another entry for the killfile.

If you think so, why isn't he in *your* killfile? (proof: you've just
followed up to one of his posts).

An almost too perfect illustration of Kenny's point!...
 
I

Ian Collins

Anthony said:
CBFalconer said:
Anthony said:
CBFalconer wrote:
Anthony Fremont wrote:
BTW, there is also a timespec struct defined in time.h, it uses
nanosecond resolution. I'm not sure what function you could call
that would return a real value though, but there are macros that
convert between timeval and timespec structure formats. This is
done by multiplying uS by 1000 or dividing nS by 1000 which would
obviously not increase precision at all.
The word 'timespec' does not appear in the C standard. Thus no
such thing exists in the standard C language, and intimating that
it does is a pure falsity.
Where exactly did I say anything about The C Standard? Among the
very first words I wrote in this thread were, "Try this if your
using Linux:". My example code included <sys/time.h> and that's
[quite obviously IMO] the file I was referring to. Unlike you, I
misrepresented nothing; I suggest you find someone else to brand
as a liar, if you don't mind.
My original quote (above) is the entire message to which I
replied. This is Usenet. Never assume that ANY other message is
available to your reader. So you said nothing about Linux,
<sys/time.h>, etc. Use the quote mechanism, which is quite
convenient with most newsreaders.

I feel pretty safe in assuming that you saw the other message.

You were. He never checks before leaping in (usually well after the
event) with an OT rant.
 
K

Keith Thompson

Golden California Girls said:
Huh?

- -j Doesn't the white space make the first - a subtraction operator?
0 - -j Gets the right result but it isn't two unary operators.

-(-j) is legal but they aren't in a row.

--j we all agree is a decrement.

In "- -j", the first "-" is a subtraction operator only if there's a
left operand for it.

Given:

i = - - j;

both "-" tokens are unary minus operators.

If by "in a row" you mean adjacent without whitespace, the answer to
the question "Can you apply two unary - operators in a row?" is no.
If "- -" qualifies as adjacent, the answer is yes.
 
K

Kenny McCormack

Kenny said:
Keith Thompson said:
Han from China - Master Troll wrote:

[SNIP]

Why do you waste my time?

[...]

He's a troll; it's what he does, along with abuse, lies, and
forgeries. Arguing with him is equally a waste of your time,
and of everyone else's. Personally, I've found that the best
way to deal with him is by killfiling him.

And you'll get back to us when you've figured out how to do
that, right?

And so is McCormack (a troll). Another entry for the killfile.

If you only had one...
 
C

CBFalconer

Anthony said:
CBFalconer wrote:
.... snip ...


I feel pretty safe in assuming that you saw the other message.
I suppose I could start pointing out every time you refer to
something that isn't quoted in the same message, but that would
be infantile wouldn't it? On second thought maybe I'd fit in
better.

Yes, you probably could assume that. What you can't assume is that
I remembered the post, or the details in the post. It certainly
wasn't hitting me in the eyeballs when I made the earlier reply.

I don't mind discussing operational habits, but there is no need to
turn it into a flamewar. It hasn't, so far.
 
P

Phil Carmody

Well, let's see who he writes too, first, at least in this little
corner of the thread:

Y.- [ 36: Han from China - Master]
R. [ 59: Nelu ]
Y.- [ 46: Han from China - Master]
R. [ 82: Nelu ]
Y.- [ 0: Han from China - Master]
. [ 33: Nelu ]
R.- [ 0: Han from China - Master]
Y.- [ 29: Richard ]
. [ 14: Nelu ]
Y.- [ 12: Han from China - Master]
. [ 19: Nelu ]
R.- [ 0: Han from China - Master]
. [ 17: Nelu ]

If your presence on this group is simply to elicit further
responses from known trolls, which it apparently is, then,
to be frank, there's no reason why you won't be stuck in
killfiles as quickly as those trolls were.

Phil
 
N

Nelu

If your presence on this group is simply to elicit further
responses from known trolls, which it apparently is, then,
to be frank, there's no reason why you won't be stuck in
killfiles as quickly as those trolls were.

Quite the opposite, as can be seen from the last post on a *dead and
buried* branch of the thread. Why dig it out? I am not the only one
correcting people that are considered trolls. Just because I was the
only one involved in this as opposed to threads where multiple regulars
are involved is no reason to pick on me, in my opinion.

But if you think the answer to your 'If' is yes than stick me in your
killfile. I can't stop you.

I reserved my right to reply, but just this once. I consider this
discussion over, as it should've stayed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top