mirror of https://github.com/ARMmbed/mbed-os.git
Fix travis build
parent
44f6b8a07c
commit
e381a5f40e
|
@ -174,7 +174,7 @@ matrix:
|
||||||
- python tools/make.py -t GCC_ARM -m K64F --source=. --build=BUILD/K64F/GCC_ARM -j0
|
- python tools/make.py -t GCC_ARM -m K64F --source=. --build=BUILD/K64F/GCC_ARM -j0
|
||||||
# Check that example compiles without rtos
|
# Check that example compiles without rtos
|
||||||
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp
|
- 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
|
- python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0
|
||||||
# Run local equeue tests
|
# Run local equeue tests
|
||||||
- make -C $EVENTS/equeue test
|
- make -C $EVENTS/equeue test
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
#include <secure_time_utils.h>
|
#include <secure_time_utils.h>
|
||||||
#include "secure_time_client_spe.h"
|
#include "secure_time_client_spe.h"
|
||||||
#include "mbed_error.h"
|
#include "mbed_error.h"
|
||||||
#include "cmsis_os2.h"
|
|
||||||
#include "rtos/Kernel.h"
|
#include "rtos/Kernel.h"
|
||||||
|
|
||||||
using namespace rtos;
|
using namespace rtos;
|
||||||
|
|
||||||
|
#define SECURE_TIME_MILLISECS_IN_SEC (1000UL)
|
||||||
|
|
||||||
static uint64_t g_boot_time_in_secs = 0;
|
static uint64_t g_boot_time_in_secs = 0;
|
||||||
|
|
||||||
uint64_t secure_time_get_seconds_since_boot(void)
|
uint64_t secure_time_get_seconds_since_boot(void)
|
||||||
{
|
{
|
||||||
uint32_t freq = osKernelGetTickFreq();
|
return Kernel::get_ms_count() / SECURE_TIME_MILLISECS_IN_SEC;
|
||||||
return Kernel::get_ms_count() / freq;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void secure_time_update_boot_time(uint64_t new_time)
|
void secure_time_update_boot_time(uint64_t new_time)
|
||||||
|
|
Loading…
Reference in New Issue