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());
|
||||
|
||||
#ifdef EX_OS_WIN32
|
||||
if (WaitForSingleObject(m_handle, INFINITE) != WAIT_OBJECT_0)
|
||||
{
|
||||
return false;
|
||||
if (m_handle) {
|
||||
if (WaitForSingleObject(m_handle, INFINITE) != WAIT_OBJECT_0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(m_handle != 0) {
|
||||
|
|
|
@ -160,8 +160,10 @@ def tp_second2human(n):
|
|||
return ret
|
||||
|
||||
|
||||
def tp_timestamp_from_str(t):
|
||||
return 0
|
||||
def tp_timestamp_from_str(t, fmt='%Y-%m-%d %H:%M:%S'):
|
||||
_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():
|
||||
|
|
Loading…
Reference in New Issue