示例#1
0
scan_random::scan_random(TPIE_OS_OFFSET count, int seed) :
    m_max(count), m_remaining(count) {

    TP_LOG_APP_DEBUG("scan_random seed = ");
    TP_LOG_APP_DEBUG(static_cast<TPIE_OS_LONGLONG>(seed));
    TP_LOG_APP_DEBUG('\n');

    TPIE_OS_SRANDOM(seed);
}
示例#2
0
// Local initialization function. Create a permanent repository for the log
// file name. Should be called only once, by theLogName() below.
static char *__tpie_log_name() {
  static char tln[128];
  TPIE_OS_SRANDOM(time(NULL));
  strncpy(tln, tpie_tempnam(TPLOGPFX, TPLOGDIR), 128);
  return tln;
}