½Ã°£ :: °í¿ë°íÇØ»óµµ ¾Ë¶÷, ¼ö¸é, GetTimeofday, °£°Ý ŸÀÌ¸Ó | |
Áö±Ý ´Ù¿î·Îµå |
½Ã°£ :: °í¿ë ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Perl Artistic License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Jarkko Hietaniemi
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~jhi/
½Ã°£ :: °í¿ë ű×
½Ã°£ :: °í¿ë ¼³¸í
°íÇØ»óµµ ¾Ë¶÷, ¼ö¸é, GetTimeofday, °£°Ý ŸÀÌ¸Ó ½Ã°£ :: Hires´Â USLEEP, Nanosleep, Ualarm, GetTimeFofday ¹× setitimer / getitimer ½Ã½ºÅÛ È£Ãâ, ´Ù¸¥ ´Ü¾î, °íÇØ»óµµ ½Ã°£ ¹× ŸÀ̸ӿ¡ ´ëÇÑ ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. ¾Æ·¡ÀÇ "¿¹Á¦"¼½¼Ç°ú »ç¿ëÀ»À§ÇÑ Å×½ºÆ® ½ºÅ©¸³Æ®¸¦ ÂüÁ¶ÇϽʽÿÀ. ±âº» NanoSleep ¶Ç´Â Usleep, Ualarm, GetTimeofday ¹× setitimer / getitimer È£Ãâ¿¡ ´ëÇÑ ¼³¸íÀº ½Ã½ºÅÛ ¼³¸í¼¸¦ ÂüÁ¶ÇϽʽÿÀ. ½Ã½ºÅÛ¿¡ GetTimeofday () ¶Ç´Â ITÀÇ ¿¡¹Ä·¹À̼ÇÀ̾ø´Â °æ¿ì GetTimeofday () ¶Ç´Â ÇϳªÀÇ Àμö ¾ç½ÄÀ» °¡Á® ¿ÀÁö ¾Ê½À´Ï´Ù. tv_interval ()ÀÇ. ½Ã½ºÅÛ¿¡ nanosleep (), usleep (), select () ¹× Æú¸µÀÌ ¸ðµÎ ºÎÁ·ÇÑ °æ¿ì ½Ã°£ : hires :: usleep (), time :: hires :: nanosleep () ¶Ç´Â time :: Hires :: Sleep (). ½Ã½ºÅÛ¿¡¼ ualarm () ¹× setitimer ()°¡ ¸ðµÎ Æ÷ÇԵǾî ÀÖÁö ¾ÊÀ¸¸é ½Ã°£ :: hires :: ualarm () ¶Ç´Â time :: hires :: alarm (). »ç¿ë ¼³¸í¼¿¡¼ unimephemented ÇÔ¼ö¸¦ °¡Á® ¿À·Á°íÇϸé ÄÄÆÄÀÏ ½Ã°£¿¡ ½ÇÆÐÇÕ´Ï´Ù. ÇØÁ¦ ¼ö¸éÀÌ USLEEP () ´ë½Å NANOSLEEP ()·Î ÇØÁ¦µÇ¸é NANOSLEEP ()°¡ ½ÅÈ£¸¦ »ç¿ëÇÏÁö ¾ÊÀ¸¹Ç·Î ÇØÁ¦¸¦ ½ÅÈ£·Î È¥ÇÕ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ±×·¯³ª ÀÌ°ÍÀº ÈÞ´ë ÇÒ ¼ö ¾øÀ¸¸ç ½Ã°£ :: Hires :: D_NanoSleepÀ» ¸ÕÀú È®ÀÎÇÏ¿© ³ª³ë ·¹ÇÁ°¡ ÀÖ´ÂÁö ¿©ºÎ¸¦ È®ÀÎÇÑ ´ÙÀ½ ƯÀÌÇÑ Ç°¸ñ¿¡ ´ëÇÑ Nanosleep () C API ¹®¼¸¦ ½ÅÁßÇÏ°Ô ÀÐÀ¸½Ê½Ã¿À. NanosleEP¸¦ »ç¿ëÇÏ´Â °Íº¸´Ù ´Ù¸¥ °Íº¸´Ù ¹Í½ÌÇÏ´Â °Íº¸´Ù ´Ù¸¥ °Í¿¡ ´ëÇØ PerlÀÌ ³ª³ëÃÊ Á¤È®µµ¸¦ ¿ä±¸ÇÏ´Â ÀÛ¾÷¿¡ ´ëÇØ »ç¿ëÇؾßÇÏ´ÂÁö ¿©ºÎ¿¡ ´ëÇØ »ý°¢Çغ¸½Ê½Ã¿À. ÇÏµå ½Ç½Ã°£ ½Ã½ºÅÛ¿¡¼ ÀÛ¾÷ÇÏ°í ÀÖÁö ¾ÊÀ¸¸é ¸ðµç ½Ã°è¿Í ŸÀ̸Ӱ¡ ºÎÁ¤È®ÇÏ°Ô µÉ °ÍÀÔ´Ï´Ù. ƯÈ÷ ¼±Á¦ ´ÙÁß »ç¿ëÀÚ ½Ã½ºÅÛ¿¡¼ ÀÏÇÏ´Â °æ¿ì. Wallclock ½Ã°£°ú ÇÁ·Î¼¼½º ½Ã°£ (UNIX¿Í °°Àº ½Ã½ºÅÛ¿¡¼ »ç¿ëÀÚ ¹× ½Ã½ºÅÛ ½Ã°£)ÀÇ Â÷ÀÌÁ¡À» ÀÌÇØÇϽʽÿÀ. X ÃÊ µ¿¾È ÀáÀÚ´Â ½Ãµµ´Â ¾Æ¸¶ ±× ÀÌ»óÀ» ³¡³»Áö ¾ÊÀ» °ÍÀÔ´Ï´Ù. ±×·¯³ª ´ç½ÅÀÌ ¾à°£ ´õ ÀûÀº ÀÚ¸éÀ» ³¡³»´Â °æ¿ì¿¡ ¹Ì¸éÇÏÁö ¸¶½Ê½Ã¿À. Synopsis »ç¿ë ½Ã°£ :: Hires QW (Usleep Ularm GetTimeofday TV_intime clock_getres clock_nanosleep ½Ã°è Åë°è) ...¿¡ USLEEP ($ ¸¶ÀÌÅ©·Î ÃÊ); ³ª³ëÇà ($ nanoseconds); Ualarm ($ ¸¶ÀÌÅ©·Î ÃÊ); Ualarm ($ ¸¶ÀÌÅ©·Î ÃÊ, $ interval_microseconds); $ T0 = ; ($ ÃÊ, $ micasteconds) = GetTimeofday; $ eleapsed = TV_INTERVAL ($ T0, ); $ Elapsed = TV_INTERVAL ($ T0, ); $ Elapsed = TV_INTERVAL ($ T0); »ç¿ë ½Ã°£ :: QW (½Ã°£ °æº¸ ¼ö¸é ½Ã°£); $ now_fractions = ½Ã°£; ¼ö¸é ($ floating_seconds); ¾Ë¶÷ ($ floating_seconds); ¾Ë¶÷ ($ floating_seconds, $ floating_interval); »ç¿ë ½Ã°£ :: QW (Setitimer Getitimer)¸¦ °í¿ëÇÕ´Ï´Ù. setitimer ($ floating_seconds, $ floating_interval); Getitimer ($); »ç¿ë ½Ã°£ :: QW (clock_gettime clock_getres clock_nanosleep itimer_real iTimer_Virtual Itimer_Prof itimer_realprof) $ realtime = clock_gettime (clock_realtime); $ ÇØ°á = clock_getres (clock_realtime); clock_nanosleep (clock_realtime, 1.5e9); clock_nanosleep (clock_realtime, time () * 1E9 + 10E9, Timer_ABstime); MY $ TIGTOCK = CLOCK (); »ç¿ë ½Ã°£ :: QW (STAT)¸¦ °í¿ëÇϽʽÿÀ. my @stat = stat ( "file"); ³» @stat = stat (FH); ¿ä±¸ »çÇ× : ¡¤ Perl.
½Ã°£ :: °í¿ë °ü·Ã ¼ÒÇÁÆ®¿þ¾î