t_express_system Serial
#2

CurrentTime ServerNum ChannelNum SerialNumber (increases everytime by 1 till 9999 and then resets to 0000)

1648570643 01 02 7405

std:Confusedtring GetSerial()
{
static int serial = 0;
int nowtime = (int)time(0);

std:Confusedtring str = boost:Confusedtr(boost::format("%d%02d%02d%04d") % nowtime % gserver->m_serverno % gserver->m_subno % serial);
++serial;
if (serial > 9999)
{
serial = 0;
}

return str;
}

 



Messages In This Thread
[No subject] - by FCV2005 - 04-05-2022, 09:31 PM
[No subject] - by WhosUrDaddi - 04-05-2022, 09:48 PM
[No subject] - by FCV2005 - 04-06-2022, 03:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)