Esempio n. 1
0
static ULONG hb_TimeStrToSec( char * pszTime )
{
   ULONG ulLen;
   ULONG ulTime = 0;

   HB_TRACE(HB_TR_DEBUG, ("hb_TimeStrToSec(%s)", pszTime));

   ulLen = strlen( pszTime );

   if( ulLen >= 1 )
      ulTime += ( ULONG ) hb_strVal( pszTime, ulLen ) * 3600;

   if( ulLen >= 4 )
      ulTime += ( ULONG ) hb_strVal( pszTime + 3, ulLen - 3 ) * 60;

   if( ulLen >= 7 )
      ulTime += ( ULONG ) hb_strVal( pszTime + 6, ulLen - 6 );

   return ulTime;
}
Esempio n. 2
0
static HB_ULONG hb_TimeStrToSec( const char * pszTime )
{
   HB_SIZE  nLen;
   HB_ULONG ulTime = 0;

   HB_TRACE( HB_TR_DEBUG, ( "hb_TimeStrToSec(%s)", pszTime ) );

   nLen = strlen( pszTime );

   if( nLen >= 1 )
      ulTime += ( HB_ULONG ) hb_strVal( pszTime, nLen ) * 3600;

   if( nLen >= 4 )
      ulTime += ( HB_ULONG ) hb_strVal( pszTime + 3, nLen - 3 ) * 60;

   if( nLen >= 7 )
      ulTime += ( HB_ULONG ) hb_strVal( pszTime + 6, nLen - 6 );

   return ulTime;
}
Esempio n. 3
0
static long hb_TimeStrToSec( const char * pszTime )
{
   HB_SIZE nLen;
   long lTime = 0;

   HB_TRACE( HB_TR_DEBUG, ( "hb_TimeStrToSec(%s)", pszTime ) );

   nLen = strlen( pszTime );

   if( nLen >= 1 )
      lTime += ( long ) hb_strVal( pszTime, nLen ) * 3600;

   if( nLen >= 4 )
      lTime += ( long ) hb_strVal( pszTime + 3, nLen - 3 ) * 60;

   if( nLen >= 7 )
      lTime += ( long ) hb_strVal( pszTime + 6, nLen - 6 );

   return lTime;
}