CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

time

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 1, 2006, 23:21
Default time
  #1
jj
Guest
 
Posts: n/a
dear all, can any one help me how to write code in visual c++ for calculating total time for simulation..i mean what is total time taken for getting results... plz tell what are the commnds available .. thanks in advance
  Reply With Quote

Old   August 2, 2006, 01:57
Default Re: time
  #2
Harish
Guest
 
Posts: n/a
#include<time.h>

int main(void) { time_t start,end;

time(&start); ...

...

time(&end);

cout<<difftime(end,start); return 0; }

The difftime prints the time of run in seconds.
  Reply With Quote

Old   August 2, 2006, 01:58
Default Re: time update
  #3
Harish
Guest
 
Posts: n/a
cout<<difftime(end,start) prints time of run in seconds

  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time step size and max iterations per time step pUl| FLUENT 31 August 21, 2015 04:46
Multiple floating objects CKH OpenFOAM 10 September 21, 2011 23:13
Time step in transient simulation shib FLUENT 0 June 17, 2010 13:07
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 09:15
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32


All times are GMT -4. The time now is 23:45.