Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Units of time when using ToBinary() method of DateTime

Units of time when using ToBinary() method of DateTime

Scheduled Pinned Locked Moved C#
tutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WBurgMo
    wrote on last edited by
    #1

    Does any one know the units of time used by the ToBinary method of DateTime? For example

    long start = DateTime.Now.ToBinary();
    Sleep(1000);
    long elapsed = DateTime.Now.ToBinary()-start; 
    

    The variable elapsed will be in the range of 10,000,000. What does this value represent? Is it tenths of a micro second or some other unit of time? Thanks James johnson

    N 1 Reply Last reply
    0
    • W WBurgMo

      Does any one know the units of time used by the ToBinary method of DateTime? For example

      long start = DateTime.Now.ToBinary();
      Sleep(1000);
      long elapsed = DateTime.Now.ToBinary()-start; 
      

      The variable elapsed will be in the range of 10,000,000. What does this value represent? Is it tenths of a micro second or some other unit of time? Thanks James johnson

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      WBurgMo wrote:

      The variable elapsed will be in the range of 10,000,000.

      I am not sure it will be in this range. Value you are getting is a signed 64-bit number.

      WBurgMo wrote:

      Is it tenths of a micro second or some other unit of time?

      Here is what MSDN says, Serializes the current DateTime object to a 64-bit binary value that subsequently can be used to recreate the DateTime object.

      Navaneeth How to use google | Ask smart questions

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups