Exodus 7.10

Functions
ex_put_time.c File Reference
`#include "exodusII.h"`
`#include "exodusII_int.h"`

## Functions
int | ex_put_time (int exoid, int time_step, const void *time_value)

## Function Documentation

## ◆ ex_put_time()

int ex_put_time | ( | int | exoid,
|  | int | time_step,
|  | const void * | time_value
| ) |  |

The function ex_put_time() writes the time value for a specified time step.

Because time values are floating point values, the application code must declare the array passed to be the appropriate type (float or double) to match the compute word size passed in ex_create() or ex_open().

Returns
  In case of an error, ex_put_time() returns a negative number; a warning will return a positive number. Possible causes of errors include:
  - data file not properly opened with call to ex_create() or ex_open()
  - data file opened for read only.

Parameters

  [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open().
  [in] | time_step | The time step number. This is essentially a counter that is incremented only when results variables are output to the data file. The first time step is 1.
  [in] | time_value | The time at the specified time step.

The following code segment will write out the simulation time value at simulation time step n:

int error, exoid, n;
float time_value;
/* write time value */
error = ex_put_time (exoid, n, &time_value);