23 #if defined (HAVE_CONFIG_H) 48 : ot_unix_time (static_cast<time_t> (
d)), ot_usec (0)
51 ot_usec =
static_cast<int> (std::modf (
d, &ip) * 1e6);
55 : ot_unix_time (), ot_usec ()
61 t.tm_hour = tm.
hour ();
62 t.tm_mday = tm.
mday ();
64 t.tm_year = tm.
year ();
65 t.tm_wday = tm.
wday ();
66 t.tm_yday = tm.
yday ();
69 #if defined (HAVE_TM_GMTOFF) 73 #if defined (HAVE_STRUCT_TM_TM_ZONE) 81 #if defined (HAVE_STRUCT_TM_TM_ZONE) 100 << std::setw (6) << std::setfill (
'0') << ot.
ot_usec;
124 #define DEFINE_SET_FIELD_FCN(type, f, lo, hi) \ 126 base_tm::f (type v) \ 133 #define DEFINE_SET_INT_FIELD_FCN(f, lo, hi) \ 134 DEFINE_SET_FIELD_FCN (int, f, lo, hi) 156 #if ! defined STRFTIME_BUF_INITIAL_SIZE 157 # define STRFTIME_BUF_INITIAL_SIZE 128 179 #if defined (HAVE_TM_GMTOFF) 183 #if defined (HAVE_STRUCT_TM_TM_ZONE) 188 const char *fmt_str = fmt.c_str ();
192 size_t chars_written = 0;
194 while (chars_written == 0)
197 buf =
new char [bufsize];
206 #if defined (HAVE_STRUCT_TM_TM_ZONE) 224 struct ::tm *
t =
static_cast<struct ::tm *
> (
p);
236 #if defined (HAVE_TM_GMTOFF) 240 #if defined (HAVE_STRUCT_TM_TM_ZONE) 243 #elif defined (HAVE_TZNAME) 244 if (
t->tm_isdst == 0 ||
t->tm_isdst == 1)
284 #if defined (HAVE_TM_GMTOFF) 288 #if defined (HAVE_STRUCT_TM_TM_ZONE) 293 const char *
p =
str.c_str ();
299 if (
t.tm_mday != 0 &&
t.tm_mon >= 0
319 #if defined (HAVE_STRUCT_TM_TM_ZONE) 333 time_t usr_sec, sys_sec;
334 long usr_usec, sys_usec;
for fields that display a single padding can be changed or inhibited by following the hour(hh:mm:ss [AP]M). tem %R Time
std::ostream & operator<<(std::ostream &os, const time &ot)
std::string asctime(void) const
#define DEFINE_SET_INT_FIELD_FCN(f, lo, hi)
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an return the underlying struct Observe that the syntax is optimized for struct trong struct("foo", 1) esult
void init(const time &ot)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
int octave_getrusage_wrapper(time_t *usr_sec, time_t *sys_sec, long *usr_usec, long *sys_usec, long *maxrss, long *ixrss, long *idrss, long *isrss, long *minflt, long *majflt, long *nswap, long *inblock, long *oublock, long *msgsnd, long *msgrcv, long *nsignals, long *nvcsw, long *nivcsw)
int octave_gettimeofday_wrapper(time_t *sec, long *usec)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
time_t octave_mktime_wrapper(struct tm *tp)
std::string strftime(const std::string &fmt) const
int octave_cpu_time(time_t *usr_sec, time_t *sys_sec, long *usr_usec, long *sys_usec)
std::string zone(void) const
char * octave_strptime_wrapper(const char *p, const char *fmt, struct tm *t)
void init(const std::string &str, const std::string &fmt)
time_t unix_time(void) const
charNDArray max(char d, const charNDArray &m)
static char * strsave(const char *s)
#define DEFINE_SET_FIELD_FCN(type, f, lo, hi)
std::string ctime(void) const
#define STRFTIME_BUF_INITIAL_SIZE
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
void init(const time &ot)
size_t octave_strftime_wrapper(char *buf, size_t len, const char *fmt, const struct tm *t)
charNDArray min(char d, const charNDArray &m)