Ognacの雑感

木漏れ日々

目次

Blog 利用状況

書庫

ギャラリ

Sleep祭り(?)

http://blogs.wankuma.com/jitta/archive/2010/05/08/188819.aspx#FeedBack
http://blogs.wankuma.com/episteme/archive/2010/05/08/188833.aspx
その他。

事の発端は置いといてて。
Sleep(1000)の測定結果がいろいろあがっています。
何れも約1000mSec経過後、処理を再開という面では揃っているのですが、Sleep()のexit条件である、経過mSecは「1000mseecを超えた時点」ではないのね。
結果をみると、Windows OSの時刻カウンタが 15mSecなのでね、998~1014の範囲でExitしているようです。
これって、脱出判定の要素自体、15mSecでバウンドされているのかなぁ。
1000mSec以下でExitする仕様が、どうもスッキリしない。1000msecを超えた時点..としたら 1002~1017msecでexitするので、誤差が大きくなるからでしょうか。
「目覚めよ」イベントの発生はスレッド/タスクコントローラが行っているのでしょうから、そこの判定単位の問題かな。

高解像度タイマーで計測すれば、1msecでもSleep()可能なんでしょうが、仕様変更になるからできないのかも。
Client系のOSでのSQL Serverの Timer値も、15msec単位ですし。

ついでに気になったのは、Sleep(1000)で、最大でも 1013msecで目覚めているようですが、1100msecで目覚めても、仕様通りな訳ですよね。
他のスレッドやタスクの状況で変わるのでしょうが、 sleep(1000)が 1200msecなどの、大幅に遅れて目覚めるような、テスト環境って作れるのだろうか。
ノンプリマルチタスクで無限ループにすると、目覚めることすらできないと思う。 Sleep()で遊ぶのは難しそうです。

今回のSleep()騒動は、精密ドライバーが必要な場に、大工道具のドライバーを持ち込んで、且つ使い方が間違っているようなもので、なんともはや....な思いでした。
しかしそのお陰で、気にとめていなかった、Sleepの奥深さを知ることができて、良かったです。
お疲れ様でした。

投稿日時 : 2010年5月8日 19:28

Feedback

# re: Sleep祭り(?) 2010/05/09 3:34 なちゃ

というか、測定がTickCountでしかも測定側も当然スレッドですから。
測定誤差でその程度は普通でしょう。

# re: Sleep祭り(?) 2010/05/09 3:37 なちゃ

目覚めるといっても、またその意味がいろいろ考えられますしね。

# re: Sleep祭り(?) 2010/05/09 23:35 Ognac

初期の仕様の柵って所でしょうか。
スレッドコントローラの実装如何にもよるのでしょうね。
奥深いSleepさん。

# Askihg quextions are actually pleasant thing if you are noot understandng something completely, however this paragraph prexents pleaasant understanding yet. 2023/05/04 8:39 Asking questions are actualky pleasnt tthing if yo

Asking questiions are actually pleasant thing iff yoou are
not understanding something completely, however this paragrapph presents
pleasant unrerstanding yet.

# Howdy just wanted tto give yoou a quidk heasds up. The words in your content seem to bee running off the screen inn Opera. I'm nnot sure if this is a format issuye or somethig too do wiith browser compatibility bbut I thought I'd post too let you know. 2023/05/04 12:10 Howdy just wanted tto give youu a quick heads up.

Howdy jut wanted too give yoou a quick headss up. Thee words in ypur
content swem too be running off thhe screen in Opera.

I'm not sure if this is a format issuue or something tto do with
browser compatibility buut I thought I'd post tto let you know.

The layout loook great though! Hope yyou get thhe issue solved soon.
Manny thanks

# My partneer annd I stumbped ovger here diffferent pagee annd thought I might as well check things out. I like what I seee so i am just followjng you. Look forward to looking at your web page again. 2023/05/05 2:54 My partner annd I stumbled ovwr here different pa

My partner and I stumbled ovsr here difdferent age and thoght I miyht
as well checkk things out. I loke what I seee so i aam just following you.
Look foreward tto looking at your web page again.

# I am genuiely gla to rwad this web site polsts which includes lots of useful information, thanks for providing such data. 2023/05/05 3:04 I am genuinely goad to read this wweb ste posts wh

I am genuinely glad to read thiis weeb sute posts which icludes
llots of useful information, thanks for providinjg such data.

# Amazing! Its in fact amazing article, I have got much clear idea on the topic of ftom this article. 2023/05/17 21:13 Amazing! Its inn fact amjazing article, I hqve got

Amazing! Its in faht amaziong article, I have got much coear idea on thhe topic of from
this article.

# Wow, that's whqt I wass exploring for, what a stuff! presenht hede at this website, thanks amin of this website. 2023/05/19 5:44 Wow, that's what I was exploring for, what a stuff

Wow, that's whwt I was exploring for,what a stuff!
present here at this website, thanks admmin of this website.

# Do you have anny video of that? I'd csre to find out more details. 2023/05/20 5:35 Do you have any video oof that? I'd csre too finhd

Do you haave any video of that? I'd care too find out morfe details.

# Greetings! I've been reading your website for a while now andd finally got thhe bravery too goo ahnead and ggive you a sshout out frrom Dallas Texas! Just wanted tto mention keep upp the fantastioc job! 2023/05/22 0:58 Greetings! I've beesn reading your website for a h

Greetings! I've been reading yourr webste for a while now and finally got
the bravery too goo aheaad aand give you a shout outt frm Dallas Texas!
Just wanted to mention keep up the fatastic job!

# We stumbled ovdr here coming from a different website and thouyght I should check things out. I like whatt I seee so now i am following you. Look forrward to looking into your web pagfe for a scond time. 2023/07/11 20:14 We stumbled over here copming from a different web

We stumbled over herre coming fom a different website
and thought I sshould check things out. I likme whatt I
see sso now i am following you. Look forward to looking into your web page
forr a second time.

# We stumbled ovdr here coming from a different website and thouyght I should check things out. I like whatt I seee so now i am following you. Look forrward to looking into your web pagfe for a scond time. 2023/07/11 20:15 We stumbled over here copming from a different web

We stumbled over herre coming fom a different website
and thought I sshould check things out. I likme whatt I
see sso now i am following you. Look forward to looking into your web page
forr a second time.

# Hello, I enjoy reading throuh your post. I like to write a little cmment to support you. 2023/07/12 21:17 Hello, I enjoy reading through your post. I ike to

Hello, I enjoy reading through your post. I like to write a little commejt to support you.

# I knw this web page givves quality depending pots aand extra stuff, iis there aany other wweb pqge whoch provdes these kinds of things inn quality? 2023/08/06 2:53 I know this web page giuves quality dedpending pos

I know thus wweb pagee givws quality depwnding
posts and extra stuff, is theee any oter web page which provides thwse kinnds of thimgs in quality?

# I wwas wonddering if you ever considered changikng the page layoiut of yourr website? Itss veey well written; I lovce what youve got tto say. Butt maybe yyou could a little more in the wway of content so people could connedt with itt better. Youve got a 2023/08/08 1:44 I was wodering if you efer consideredd changing th

I waas wonderinbg if yoou eever coknsidered changin tthe page
layout of your website? Its very well written; I love what youve goot to say.
But maybe yoou ckuld a littpe more inn the wway of content so
pedople could connect with it better. Youge goot ann awful lott off tedt forr only having onee or two pictures.
Maybe yyou coul space it out better?

# Peculiar article, just what I waas lookibg for. 2023/09/02 1:20 Peculiar article, judt whaat I was lookking for.

Peculiar article, ust what I was lookig for.

# Thanms ffor thee auspicious writeup. It actually usrd tto bbe a leisure accoun it. Glasnce adganced tto more introducsd agreeable frtom you! However, hoow can wwe kedp in touch? 2023/09/02 15:58 Thanks ffor thee auspicious writeup. It actuallly

Thanks ffor the auspiciojs writeup. It actually usxed too
bbe a leisure accounjt it. Glance advanceed to more intrroduced agreeable from you!

However, how can wwe keep in touch?

# With havjn sso muchh content do you eveer run into anny issues of plagorism or copyright infringement? My site haas a llot off excluseive content I've either wrtten myseelf or outsourced but iit looks likme a llot off iit iss popping itt upp all over tt 2023/09/04 1:03 With havin soo mufh content do yyou ever run info

Witth haavin so much content do yoou ever run into aany issues
of plagorim orr copyriht infringement? My site has a lot of exclusive content I've
eiher written myself or outsouurced bbut itt looks like a lot of iit is pokpping iit up all over the internet without mmy permission. Do yoou know aany methgods too help protect againxt conent from beimg ripped off?
I'd definitely appreciate it.

# Its such as you learn my thoughts! You seem to know a lot approximately this, such as you wrote the book in it or something. I think that you can do with a few % to drive the message house a little bit, however other than that, that is excellent blog. A 2023/09/15 17:50 Its such as you learn my thoughts! You seem to kno

Its such as you learn my thoughts! You seem to know a lot
approximately this, such as you wrote the book in it or something.
I think that you can do with a few % to drive the message house a little bit,
however other than that, that is excellent blog.
A fantastic read. I'll certainly be back.

# If you want to increase your knowledge only keep visiting this site and be updated with the most recent information posted here. 2023/10/30 7:01 If you want to increase your knowledge only keep v

If you want to increase your knowledge only keep visiting this site and be updated
with the most recent information posted here.

# Tremendous issues here. I am very satisfied to peer your article. Thanks so much and I am taking a look ahead to contact you. Will you please drop me a e-mail? 2023/10/30 7:09 Tremendous issues here. I am very satisfied to pee

Tremendous issues here. I am very satisfied to peer your
article. Thanks so much and I am taking a look ahead to contact you.
Will you please drop me a e-mail?

# My programmer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the expenses. But he's tryiong none the less. I've been using Movable-type on numerous websites for about a year and am anxious about switching 2023/11/01 0:13 My programmer is trying to convince me to move to

My programmer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the expenses.
But he's tryiong none the less. I've been using
Movable-type on numerous websites for about a year and am anxious about switching to another platform.

I have heard excellent things about blogengine.net.
Is there a way I can transfer all my wordpress content into
it? Any help would be really appreciated!

# You've made some good points there. I checked on the internet for additional information about the issue and found most people will go along with your views on this web site. 2023/11/07 18:40 You've made some good points there. I checked on t

You've made some good points there. I checked on the internet for additional
information about the issue and found most
people will go along with your views on this web site.

# I am really enjoying the theme/design of your web site. Do you ever run into any browser compatibility issues? A couple of my blog visitors have complained about my site not working correctly in Explorer but looks great in Opera. Do you have any recomm 2023/11/19 15:14 I am really enjoying the theme/design of your web

I am really enjoying the theme/design of your web
site. Do you ever run into any browser compatibility
issues? A couple of my blog visitors have complained about my site not
working correctly in Explorer but looks great in Opera. Do you have any recommendations to help fix this issue?

# http://brucesilversteinphotography.com/__media__/js/netsoltrademark.php?d=madepics.net http://homeykitchen.com/__media__/js/netsoltrademark.php?d=madepics.net http://yellowribbonsite.org/__media__/js/netsoltrademark.php?d=madepics.net http://blpcbackup.co 2023/12/15 4:32 http://brucesilversteinphotography.com/__media__/j

http://brucesilversteinphotography.com/__media__/js/netsoltrademark.php?d=madepics.net http://homeykitchen.com/__media__/js/netsoltrademark.php?d=madepics.net http://yellowribbonsite.org/__media__/js/netsoltrademark.php?d=madepics.net http://blpcbackup.com/__media__/js/netsoltrademark.php?d=madepics.net http://jilljaffe.com/__media__/js/netsoltrademark.php?d=madepics.net http://soilwithsoul.com/__media__/js/netsoltrademark.php?d=madepics.net http://6iq.piacorp.net/__media__/js/netsoltrademark.php?d=madepics.net http://www.robertovascon.com/__media__/js/netsoltrademark.php?d=madepics.net

# Hey there this is kind of of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I'm starting a blog soon but have no coding experience so I wanted to get advice from someone with experience. Any help w 2024/10/11 3:22 Hey there this is kind of of off topic but I was w

Hey there this is kind of of off topic but I was wondering if blogs use
WYSIWYG editors or if you have to manually code with HTML.
I'm starting a blog soon but have no coding experience so I wanted to get advice from someone with experience.

Any help would be greatly appreciated!

# Great goods from you, man. I have understand your stuff previous to and you're just extremely magnificent. I actually like what you've acquired here, really like what you're saying and the way in which you say it. You make it enjoyable and you still t 2024/10/19 14:08 Great goods from you, man. I have understand your

Great goods from you, man. I have understand your stuff previous to and
you're just extremely magnificent. I actually like what you've acquired here, really like what you're saying and the way
in which you say it. You make it enjoyable and you still take care of to keep it wise.
I cant wait to read far more from you. This is really a wonderful web site.

# I am curious to find out what blog platform you have been utilizing? I'm experiencing some small security problems with my latest website and I would like to find something more safe. Do you have any recommendations? 2024/10/19 14:17 I am curious to find out what blog platform you ha

I am curious to find out what blog platform you have been utilizing?
I'm experiencing some small security problems with my latest website and I would like
to find something more safe. Do you have any recommendations?

# Great goods from you, man. I've understand your stuff previous to and you are just extremely fantastic. I actually like what you have acquired here, certainly like what you're saying and the way in which you say it. You make it enjoyable and you still c 2024/10/19 14:57 Great goods from you, man. I've understand your st

Great goods from you, man. I've understand your stuff previous to and you
are just extremely fantastic. I actually like what you have acquired here, certainly like
what you're saying and the way in which you say it. You make it enjoyable and you still care for
to keep it sensible. I can't wait to read far more from you.
This is really a tremendous web site.

# Great goods from you, man. I've understand your stuff previous to and you are just extremely fantastic. I actually like what you have acquired here, certainly like what you're saying and the way in which you say it. You make it enjoyable and you still c 2024/10/19 14:59 Great goods from you, man. I've understand your st

Great goods from you, man. I've understand your stuff previous to and you
are just extremely fantastic. I actually like what you have acquired here, certainly like
what you're saying and the way in which you say it. You make it enjoyable and you still care for
to keep it sensible. I can't wait to read far more from you.
This is really a tremendous web site.

# You could definitely see your enthusiasm within the article you write. The world hopes for more passionate writers like you who are not afraid to say how they believe. All the time go after your heart. 2024/11/10 5:27 You could definitely see your enthusiasm within th

You could definitely see your enthusiasm within the article you write.

The world hopes for more passionate writers like you who are not afraid to say how they believe.
All the time go after your heart.

# Great delivery. Outstanding arguments. Keep up the great effort. 2024/11/10 7:25 Great delivery. Outstanding arguments. Keep up the

Great delivery. Outstanding arguments. Keep up the great effort.

タイトル
名前
Url
コメント