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 / C++ / MFC
  4. Timing in C language <time.h>

Timing in C language <time.h>

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminquestion
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.
  • A Offline
    A Offline
    a random user
    wrote on last edited by
    #1

    Hello there, in my currect project im trying to communicate between a server and a client codes that I created between 2 computers with the libraries of winsock2 and windows In order to sync the send and recv functions I am trying using the library time.h but I wish to reset the clock() in a certain area of the code so i could start the count since that point and not since the start of the runtime *This has nothing to do with my homeworks this is a legeit question*

    CPalliniC 1 Reply Last reply
    0
    • A a random user

      Hello there, in my currect project im trying to communicate between a server and a client codes that I created between 2 computers with the libraries of winsock2 and windows In order to sync the send and recv functions I am trying using the library time.h but I wish to reset the clock() in a certain area of the code so i could start the count since that point and not since the start of the runtime *This has nothing to do with my homeworks this is a legeit question*

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Quote:

      but I wish to reset the clock() in a certain area of the code so i could start the count since that point and not since the start of the runtime

      You usually don't do that. Instead, you keep track of your 'zero-time' and subtract it to the current one in order to find out the elapsed interval (You may use difftime[^] for the purpose).

      In testa che avete, signor di Ceprano?

      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