mirror of https://github.com/tp4a/teleport
.temp.
parent
b4be3de0b3
commit
b73b3d9b93
|
@ -75,9 +75,10 @@ bool ExThreadBase::stop(void) {
|
||||||
EXLOGV("[thread] wait thread [%s] exit.\n", m_thread_name.c_str());
|
EXLOGV("[thread] wait thread [%s] exit.\n", m_thread_name.c_str());
|
||||||
|
|
||||||
#ifdef EX_OS_WIN32
|
#ifdef EX_OS_WIN32
|
||||||
if (WaitForSingleObject(m_handle, INFINITE) != WAIT_OBJECT_0)
|
if (m_handle) {
|
||||||
{
|
if (WaitForSingleObject(m_handle, INFINITE) != WAIT_OBJECT_0) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if(m_handle != 0) {
|
if(m_handle != 0) {
|
||||||
|
|
|
@ -160,8 +160,10 @@ def tp_second2human(n):
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def tp_timestamp_from_str(t):
|
def tp_timestamp_from_str(t, fmt='%Y-%m-%d %H:%M:%S'):
|
||||||
return 0
|
_fmt = '%Y-%m-%d %H:%M:%S' if fmt is None else fmt
|
||||||
|
d = datetime.datetime.strptime(t, _fmt)
|
||||||
|
return int(d.timestamp())
|
||||||
|
|
||||||
|
|
||||||
def tp_timestamp_sec():
|
def tp_timestamp_sec():
|
||||||
|
|
Loading…
Reference in New Issue