Fix travis build

feature-secure-time
Michael Schwarcz 2018-05-29 11:02:04 +03:00 committed by Cruz Monrreal II
parent 44f6b8a07c
commit e381a5f40e
2 changed files with 4 additions and 4 deletions

View File

@ -174,7 +174,7 @@ matrix:
- python tools/make.py -t GCC_ARM -m K64F --source=. --build=BUILD/K64F/GCC_ARM -j0
# Check that example compiles without rtos
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp
- rm -r rtos features/cellular features/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client features/frameworks/utest features/frameworks/unity components BUILD
- rm -r rtos features/cellular features/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client features/frameworks/utest features/frameworks/unity components BUILD secure_time
- python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0
# Run local equeue tests
- make -C $EVENTS/equeue test

View File

@ -15,17 +15,17 @@
#include <secure_time_utils.h>
#include "secure_time_client_spe.h"
#include "mbed_error.h"
#include "cmsis_os2.h"
#include "rtos/Kernel.h"
using namespace rtos;
#define SECURE_TIME_MILLISECS_IN_SEC (1000UL)
static uint64_t g_boot_time_in_secs = 0;
uint64_t secure_time_get_seconds_since_boot(void)
{
uint32_t freq = osKernelGetTickFreq();
return Kernel::get_ms_count() / freq;
return Kernel::get_ms_count() / SECURE_TIME_MILLISECS_IN_SEC;
}
void secure_time_update_boot_time(uint64_t new_time)