Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:59:00+00:00 2026-06-09T06:59:00+00:00

In Scapy (which uses tcpdump to capture packets), I’m extracting timestamps from a data

  • 0

In Scapy (which uses tcpdump to capture packets), I’m extracting timestamps from a data packet that I sent and from the ICMP reply that I got from it.

>>> icmpPacket.time
1344448836.482289
>>> dataPacket.time
1344448832.707281
>>> RTT = icmpPacket.time - dataPacket.time
>>> RTT
3.775007963180542

What’s the unit of time here? How can I have it in seconds?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:59:01+00:00Added an answer on June 9, 2026 at 6:59 am

    The unit of time is seconds since the UNIX epoch (00:00:00 UTC on 1 January 1970). Use the time or datetime modules to interpret these, depending on your needs. The latter is a higher-level module.

    Example:

    >>> import datetime
    >>> icmpstamp = datetime.datetime.fromtimestamp(1344448836.482289)
    >>> icmpstamp
    datetime.datetime(2012, 8, 8, 20, 0, 36, 482289)
    >>> print icmpstamp
    2012-08-08 20:00:36.482289
    >>> datastamp = datetime.datetime.fromtimestamp(1344448832.707281)
    >>> datastamp
    datetime.datetime(2012, 8, 8, 20, 0, 32, 707281)
    >>> print datastamp
    2012-08-08 20:00:32.707281
    >>> difference = icmpstamp - datastamp
    >>> difference
    datetime.timedelta(0, 3, 775008)
    >>> print difference
    0:00:03.775008
    

    Your RTT value is thus already the difference between the two timestamps in seconds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Scapy to replay some dumped packets in which I change the TTL
I am working on scrapy , i am trying to gather some data from
I'm trying to port a program which uses a hand-rolled interpolator (developed by a
Following this question which asks (and answers) how to read .mat files that were
I have a python module which generates large data files which I want to
I have an XPath with which I'm trying to match meta tags that have
I analyzed the sunspots.dat data (below) using fft which is a classic example in
I have a .mat file in which I put data previously processed. When I
I am working on a data-mining project for which I need to analyse the
What is the best way to sniff network packets using Python? I've heard from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.