• Contact Editorial Team
  • Advertise on YNOT
  • Submit PR
Tuesday, March 24, 2026
  • Login
  • Register
YNOT
  • Home
  • Industry News
    • Porn Star & Adult Talent News
    • Adult Business News
    • Adult Novelty News
    • Adult Industry Legal News
    • Tech News for Adult Webmasters
    • Video Game News for Adults
    • EU News
  • PR Wire
  • Podcasts
  • Industry Guides
  • Newsletters
No Result
View All Result
  • Home
  • Industry News
    • Porn Star & Adult Talent News
    • Adult Business News
    • Adult Novelty News
    • Adult Industry Legal News
    • Tech News for Adult Webmasters
    • Video Game News for Adults
    • EU News
  • PR Wire
  • Podcasts
  • Industry Guides
  • Newsletters
No Result
View All Result
YNOT
No Result
View All Result
Home YNOT Features YNOT University

Calculating Elapsed Time Using Perl

admin by admin
December 27, 2000
in YNOT University
491
SHARES
Share on FacebookShare on Twitter

Let’s say we need to figure out how long it has been since something happened and we either don’t know how (to use) or what the built-in functions are to do this.

Or perhaps you’d like to just understand how to do it without relying on those built-in functions.Let’s say we need to figure out how long it has been since something happened and we either don’t know how (to use) or what the built-in functions are to do this.

Or perhaps you’d like to just understand how to do it without relying on those built-in functions. It seems like something like this should be really easy to do (in some languages it is), but it is difficult finding tutorials which will explain how to accomplish this, so I have decided to show you one technique that you can use in your programs to accomplish the comparison of time. You only need to know how to get a timestamp and the rest we can build raw (that is my way of saying without using external libraries or built-in functions or modules). I am going to use Perl CGI as an example, but this same technique can be used in all languages (although of course the base function names will likely change).

This is a timestamp of the number of seconds since January 1, 1\’70, which is sometimes also referred to as the computer epoch. How do we know this besides me telling you? Use the table below as a guide:

seconds 1
minute 60
hour 3600
day 86400
week 604800

Now, the next time you see a timestamp you can say, “ahh, that is the number of seconds since January 1, 1\’70, the computer epoch!” (and people will probably look at you like you are on something). Seriously, as a programmer, though, you can tap into this clock and effectively use a stopwatch to determine the passage of time. That is what we are really going to focus on: stopping the time to mark an event. Consider the code below:

#!/usr/bin/perl
$past = \’57138777;
$present = time;
$seconds = int($present – $past);
print “Content-type: text/htmlnn”;
print “Seconds elapsed: $seconds”;

Share196Tweet123
admin

admin

YNOT Admin wields his absolute power without mercy. When he's not busy banning spam comments to hell he enjoys petting bunnies and eating peanut butter. He recommends everyone try the YNOT Mail (ynotmail.com) email marketing platform and avoid giving their money to mainstream services that hate adult companies.

Related Posts

Adult Business News

UK Online Safety Act Cuts Pornhub Traffic 36% as Age Verification Takes Effect

December 13, 2025
Adult Business News

The Cambassador: Lindsey Banks, Flirt4Free and Brand Representation

September 5, 2018
Adult Business News

ImLive’s Mere Menezes Siqueira Manages Models, Makes the Machine Work

August 23, 2018
Corey Silverstein of Adult.law
Adult Business News

Silverstein Says: 3 Legal Issues Cam Companies, Models Must Pay Attention To

August 22, 2018
Load More

SPONSOR

INDUSTRY EVENTS

Currently Playing

YNOT Summit Model Track: Nerds Dig Sexy Gamers

YNOT Summit Model Track: Nerds Dig Sexy Gamers

01:05:46

YNOT Summit Webmaster Track: Understanding Webcam Business Models

00:51:11

YNOT Summit Model Track: Cam Law 101

01:26:24

SPONSOR

POPULAR NEWS

New on Adult Site Broker Talk: Tsukuru Fors of Tosai Productions

New on Adult Site Broker Talk: Tsukuru Fors of Tosai Productions

March 24, 2026
Studio 58's ‘Naughty Gras 2026’ Opens This Week

Studio 58’s ‘Naughty Gras 2026’ Opens This Week

March 24, 2026
Nalpac Releases 2026 Spring Lingerie Catalog

Nalpac Releases 2026 Spring Lingerie Catalog

March 24, 2026

Sponsor

YNOT YNOT

QUICK LINKS:

  • About YNOT
  • Terms of Use
  • Privacy Policy
  • Editorial Team
  • Advertise on YNOT
  • Sitemap

FRIENDS OF YNOT:

  • Best Adult Cams
  • Live Porn
  • Adult Reviews
  • Adult Email Marketing
  • Discounted Porn
  • vr porn sites
  • European Adult Biz Magazine

FRIENDS OF YNOT:

  • Rabbits Reviews
  • XXX Job Interviews
  • Adult Site Broker
  • Femdom
  • Paid Porn Sites
  • Live Sex
  • Cam girl sites
  • AI Girlfriend
  • live porn Vibra Game

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Adult Business News
  • Adult Industry Legal News
  • Adult Novelty News
  • Porn Star & Adult Talent News
  • Tech News for Adult Webmasters
  • Video Game News for Adults
  • Interviews
  • Opinions
  • YNOT Industry Wire
  • Newsletters

Copyright © 2026 YNOT Group LLC.

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.