{"id":546,"date":"2009-03-26T01:42:21","date_gmt":"2009-03-25T23:42:21","guid":{"rendered":"https:\/\/foton.no-ip.com\/BLOG\/?p=546"},"modified":"2010-07-27T12:31:21","modified_gmt":"2010-07-27T10:31:21","slug":"ido-time","status":"publish","type":"post","link":"https:\/\/foton.szikraistvan.hu\/blog\/?p=546","title":{"rendered":"Ido&#8221; &#8211; Time"},"content":{"rendered":"<p>&#8220;Fun&#8221; Facts:<br \/>\nTudtatok, hogy a Delphi TTimer felbontasat bar 1 ms lepesenkent lehet allitani, de a valodi felbontasa csak 1\/64 s (masodperc) = 15.625ms (Windows Timer). Regebben, meg a DOS-os idokben olvastam a PC idozito\/ora felepiteserol, es BIOS megszakitasairol. Oh a kedves <a href=\"http:\/\/www.ctyme.com\/intr\/rb-0043.htm\">INT 08h<\/a> es 1ch (a kedvenc Ralf Brown interrupt list-bol) es az Intel 8254 rendszer ora, ami interruptot general minden 54.936 ms-onkent, kb. 18.2-szor masodpercenkent.<br \/>\nAzota nem kovettem a PC architekturanak\/operacios rendszernek ezen valtozasat (egyebeket igen). Hat itt az ideje egy kicsit utananezni:<br \/>\n&#8220;timestamps that you can obtain from Windows NT are limited to a maximum resolution of 10 or 15 milliseconds, depending on the underlying hardware.&#8221;<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/magazine\/cc163996.aspx\">Implement a Continuously Updating, High-Resolution Time Provider for Windows<\/a><br \/>\nJelenleg idobellyegezesre a GetSystemTimeAsFileTime -ot hasznalom (100ns=0.1us LSB). Sajnos ennek a felbontasa messze elmarad az abrazolasi pontossagtol: 155860 LSB=15.586ms.<br \/>\nTeljesitmeny meresre, optimalizalasra RDTSC utasitast. (CPU orajel)<\/p>\n<p>Egyebkent a leiras hibas az MSDN-en &#8220;Retrieves the current system date and time. The information is in Coordinated Universal Time (UTC) format.&#8221;<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms724397(VS.85).aspx\">GetSystemTimeAsFileTime Function<\/a><br \/>\nA helyes leiras a FILETIME Structure-nal van: &#8220;Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).&#8221;<br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms724284(VS.85).aspx\">FILETIME Structure<\/a><br \/>\nVagyis 1601.01.01 ota eltelt UTC masodperceket adja vissza ami nem azono az UTC formatummal, aminek pont az a lenyege, hogy kulon abrazolja a percet a masodperctol egy stringben, ami lehetove teszi a szokomasodpercek bevitelet, vagyis elofordulhat hogy 59 utan nem 00 jon a masodperc helyen, hanem 60. Igazabol vilagos leirast az UTC formatumara nem talaltam, bar sok helyen lattam az ISO 8601 abrazolast.<\/p>\n<p>Nahat mar a magyar wikipedian is fent van:<br \/>\n<a href=\"http:\/\/hu.wikipedia.org\/wiki\/Sz%C3%B6k%C5%91m%C3%A1sodperc\">Sz\u00f6k\u0151m\u00e1sodperc<\/a><br \/>\n<a href=\"http:\/\/hu.wikipedia.org\/wiki\/Egyezm%C3%A9nyes_koordin%C3%A1lt_vil%C3%A1gid%C5%91\">Egyezm\u00e9nyes koordin\u00e1lt vil\u00e1gid\u0151<\/a><\/p>\n<p>Ezt erdemes megnezni:<br \/>\n<a href=\"http:\/\/www.fourmilab.ch\/cgi-bin\/Earth\">www.fourmilab.ch\/cgi-bin\/Earth<\/a><br \/>\n<a href=\"http:\/\/www.fourmilab.ch\/cgi-bin\/uncgi\/Earth\/action?opt=-p\">www.fourmilab.ch\/cgi-bin\/uncgi\/Earth\/action?opt=-p<\/a><br \/>\n<a href=\"http:\/\/www.fourmilab.ch\/earthview\/satellite.html\">www.fourmilab.ch\/earthview\/satellite.html<\/a><br \/>\n&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Fun&#8221; Facts: Tudtatok, hogy a Delphi TTimer felbontasat bar 1 ms lepesenkent lehet allitani, de a valodi felbontasa csak 1\/64 s (masodperc) = 15.625ms (Windows Timer). Regebben, meg a DOS-os idokben olvastam a PC idozito\/ora felepiteserol, es BIOS megszakitasairol. Oh &hellip; <a href=\"https:\/\/foton.szikraistvan.hu\/blog\/?p=546\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[22,1],"tags":[],"class_list":["post-546","post","type-post","status-publish","format-standard","hentry","category-informatics","category-naplo"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3E7AZ-8O","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=\/wp\/v2\/posts\/546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=546"}],"version-history":[{"count":7,"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=\/wp\/v2\/posts\/546\/revisions"}],"predecessor-version":[{"id":822,"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=\/wp\/v2\/posts\/546\/revisions\/822"}],"wp:attachment":[{"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/foton.szikraistvan.hu\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}