SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: perl inbuilt function ??

  1. #1
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    perl inbuilt function ??

    Hello,

    do anyone know that perl has any time difference calculation function.I have to find difference between time() before and after a request.I knewthis way

    $start=time();
    sleep 60;
    $end=time();

    $diff=$end-$start;

    converting this in to min i can do but i wanted to know the perl function which return difference between timestamp.Apointer to the date/time tutorial will also be ggrl8 apprciaed.

    regards

  2. #2
    SitePoint Wizard bronze trophy KevinR's Avatar
    Join Date
    Nov 2004
    Location
    Moon Base Alpha
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no such inbuilt perl function. You have to do it programmatically like you did or use a module. There are many date/time modules on CPAN but your requirement seems so simple that I think you should just do it the way you are doing it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •