KeSetTimerEx

I am having a confusion in setting the DueTime in KeSetTimerEx function.
The syntax of KeSetTimerEx is:
KeSetTimerEx(
IN PKTIMER Timer,
IN LARGE_INTEGER DueTime,
IN LONG Period OPTIONAL,
IN PKDPC Dpc OPTIONAL
);

From the DDK documentation I understand that
DueTime is to be specified in system time units i.e. in 100-nanosecond intervals. I di not understand this.
Period is to be specified in milliseconds.
Eg.:
If I am to set a duetime and period both of one second then I will specify the period as 1000.
But can anybody let me know what to write for the duetime of one second?

From:
> From the DDK documentation I understand that
> DueTime is to be specified in system time units i.e. in 100-nanosecond
> intervals. I di not understand this.
> Period is to be specified in milliseconds.
> Eg.:
> If I am to set a duetime and period both of one second then I will specify
> the period as 1000.
> But can anybody let me know what to write for the duetime of one second?

The two time periods use different units, is all. To get a timeout after 1
second that will keep expiring every second after that, specify a due time
of -10000000 and a period of 1000.

Walter Oney
Consulting and Training
www.oneysoft.com

Thanks Walter for the reply.
Will you please elaborate how did you get -10000000.
I am asking this because I will have to use different duetimes( from millisecond to second ) at different places

> I am asking this because I will have to use different duetimes( from

millisecond to second ) at different places

These macros will make your life easier:

http://www.osronline.com/article.cfm?article=261

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntdev…
> Thanks Walter for the reply.
> Will you please elaborate how did you get -10000000.
> I am asking this because I will have to use different duetimes( from
> millisecond to second ) at different places
>

From:
> Will you please elaborate how did you get -10000000.

Minus because you want an interval, not a clock time.

10* gets you from 100 ns to 1 usec.

1000 gets you from usec to msec.

1000 gets you from msec to sec.

Walter Oney
Consulting and Training
www.oneysoft.com

Thanks a lot walter for the clarification.

Thanks Scott for the link.
It has helped a lot in clarification.

> But can anybody let me know what to write for the duetime of one second?

Well, if you need assistance with multiplication by powers of ten…probably it makes sense to start looking for some other occupation??? In fact, I DO know of someone who needs a calculator in order to multiply by ten, but she is just a secretary who does not even try to write kernel code (and, apparently , does not even know what the kernel is)…

Anton Bassov

anton bassov wrote:

Well, if you need assistance with multiplication by powers of ten…
probably it makes sense to start looking for some other occupation???

That guy from a while back didn’t know how to rename files. He got a free pass on this list from most people. Kinda sad…

From:
> Well, if you need assistance with multiplication by powers of
> ten…probably it makes sense to start looking for some other
> occupation??? In fact, I DO know of someone who needs a calculator in
> order to multiply by ten, but she is just a secretary who does not even
> try to write kernel code (and, apparently , does not even know what the
> kernel is)…

Not fair. His confusion stems from the fact that two different time units
are specified for the two arguments. IMO that was bad design to start with,
and the nuance may well be lost on someone whose first language isn’t
English or who approaches the documentation with the assumption that the
DDIs were designed with consistency in mind.

And “just” a secretary? I bet she’s also a wife, a mother, a football coach,
a chauffeur, and a bunch of other things besides. I also bet that neither of
us can do the job she does because it calls for skills (including patience
and tolerance) that we don’t have.

Walter Oney
Consulting and Training
www.oneysoft.com

> Not fair. His confusion stems from the fact that two different time units are specified

for the two arguments.

Ironically, judging from his post , somehow it happened that the OP actually managed to understand this part without a slightest problem, but expressing a second in terms of 100ns intervals required “external assistance”…

IMO that was bad design to start with,

You’ve got to be careful with statements like that in this NG - after all, this is Cutler’s design,
so that this is just a religious issue for some folks here. From the technical standpoint I don’t see anything
particularly unreasonable with it - it seems to be quite useful feature when occasionally missing a deadline is deemed a lesser evil compared to shifting the entire schedule (for example, when dealing with multimedia applications). …

And “just” a secretary? I bet she’s also a wife, a mother, a football coach, a chauffeur, and a bunch of >other things besides. I also bet that neither of us can do the job she does because it calls for skills
(including patience and tolerance) that we don’t have.

Actually, if we replace “football” with “ice hockey” the whole thing starts reminding me of some well- known public figure who reportedly believes that Africa is a country. No, I didn’t mean that one, don’t worry
about that…

Anton Bassov

anton bassov wrote:

Actually, if we replace “football” with “ice hockey” the whole thing
starts reminding me of some well- known public figure who reportedly
believes that Africa is a country.

…and showed up to an important meeting in a towel, right?

> …and showed up to an important meeting in a towel, right?

WEll, actually I believe both Africa being a country and the towel story are nothing more than FUD,
but, as we have eventually established few hours ago, some of us believe that “FUD is a normal point of view of the sane adult person - to everything, not to software only. Considering FUD to be evil is the mind quirk of of the Linux fans”…

Anton Bassov

I think that’s okay. Many people mistake America for a country, too. :wink:

  • Cay

On Thu, 23 Jul 2009 22:20:45 +0200, wrote:
>> …and showed up to an important meeting in a towel, right?
>
> WEll, actually I believe both Africa being a country and the towel story
> are nothing more than FUD,
> but, as we have eventually established few hours ago, some of us
> believe that “FUD is a normal point of view of the sane adult person -
> to everything, not to software only. Considering FUD to be evil is the
> mind quirk of of the Linux fans”…
>
>
> Anton Bassov
>
>
>

> Actually, if we replace “football” with “ice hockey” the whole thing starts reminding me of some well-

known public figure who reportedly believes that Africa is a country. No, I didn’t mean that one, don’t
worry about that…

A good old Soviet joke:

A football player was asked - “do you need your head?”. He answered - “surely, I’m eating by it!”.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> WEll, actually I believe both Africa being a country and the towel story are nothing more than FUD,

but, as we have eventually established few hours ago, some of us believe that "FUD is a normal

Do not mix FUD and libel, they are different.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> Do not mix FUD and libel, they are different.

Sure - “FUD” is relatively broad term and applies to any disinformation that result in " Fear, Uncertainty and Doubt" spreading all over the place. Unlike libel and slender, it is not a legal term , and, hence, is universal, while definitions of libel and slender may vary across jurisdictions. Therefore, depending on the exact nature of a claim, it may attract attention of lawyers in jurisdiction X (libel, defamation, violation of advertising rules,etc) while being of no interest to their colleagues in jurisdiction Y…

Anton Bassov

> Sure - “FUD” is relatively broad term and applies to any disinformation that result in " Fear,

Uncertainty and Doubt" spreading all over the place.

Not necessary DISinformation. FUD can be the truthful information which results in " Fear, Uncertainty and Doubt".

Libel is a kind of FUD which contains lies.

Unlike libel and slender, it is not a legal term , and, hence, is universal,

And hence not punisheable.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>Unlike libel and slender
Not “slender” (=strojnyj) but “slander” (=kleveta).
Just for you to avoid additional hUmmering:-)

----- Original Message -----
From: “Maxim S. Shatskih”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Saturday, July 25, 2009 8:14 AM
Subject: Re:[ntdev] KeSetTimerEx

> Sure - “FUD” is relatively broad term and applies to any disinformation
> that result in " Fear,
>Uncertainty and Doubt" spreading all over the place.

Not necessary DISinformation. FUD can be the truthful information which
results in " Fear, Uncertainty and Doubt".

Libel is a kind of FUD which contains lies.

>Unlike libel and slender, it is not a legal term , and, hence, is
>universal,

And hence not punisheable.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> FUD can be the truthful information which results in " Fear, Uncertainty and Doubt".

Well, the term FUD applies to disinformation, so that it cannot be truthful by the very definition.

OTOH, FUD does not necessarily involve lies, because sometimes it may bear no information at all, and, instead, be solely based upon unsubstantiated speculation about something that has been known for ages. The best example of FUD of a given type is Steve Gibbson’s speculation of supposed dangers of introduction of full-fledged support for raw sockets in XP . In fact, ANY any speculation by this individual is FUD of this type - he never tells anything new, never presents arguments that are technically sound, but still raises " Fear, Uncertainty and Doubt" in technically ignorant audience…

Libel is a kind of FUD which contains lies.

Please note that there is a subtle difference “telling lies” and “spreading FUD that contains lies” - you can do the latter while still telling the truth. For example, if you directly claim that “Linux violates MSFT patents”, it is a lie (unless you manage to present sufficient evidence of it, of course). However, if you present your claim indirectly, i.e. like “According to Mr. Ballmer’s statement that he made on a conference XYZ,…” , things become different - indeed, Mr.Ballmer made this claim, so that you are telling the truth while passing lies around. Furthermore, libel is always written - as long as lie is verbal it is slender, rather than libel. Therefore, if I publicly tell some defamatory lie about someone in a jurisdiction where slender is not punishable and you indirectly refer to my claim in written we can easily defame
the target and get away with it…

And hence not punisheable.

Again, it depends on how and where it gets done. Unless you careful enough, it may well happen that your FUD campaign eventually gets into a conflict with some laws (libel, defamation, violation of advertising rules,etc) of jurisdiction where a claim is made. “Get the Facts” campaign is the very first example that comes to one’s mind…

Anton Bassov