/**************************************************************************/ /* */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* */ /* This software is licensed under the Microsoft Software License */ /* Terms for Microsoft Azure RTOS. Full text of the license can be */ /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ /* and in the root directory of this software. */ /* */ /**************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** ThreadX Component */ /** */ /** Thread */ /** */ /**************************************************************************/ /**************************************************************************/ #define TX_SOURCE_CODE #define TX_THREAD_SMP_SOURCE_CODE /* Include necessary system files. */ #include "tx_api.h" #include "tx_thread.h" #include "tx_timer.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _tx_thread_smp_time_get SMP/Linux/GCC */ /* 6.1 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function gets the global time value that is used for debug */ /* information and event tracing. */ /* */ /* INPUT */ /* */ /* None */ /* */ /* OUTPUT */ /* */ /* 32-bit time stamp */ /* */ /* CALLS */ /* */ /* */ /* CALLED BY */ /* */ /* ThreadX Source */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 09-30-2020 William E. Lamie Initial Version 6.1 */ /* */ /**************************************************************************/ ULONG _tx_thread_smp_time_get(void) { /* Get the time stamp. */ clock_gettime(CLOCK_REALTIME, &_tx_linux_time_stamp); /* Return 32-bit time. */ return(((ULONG) (_tx_linux_time_stamp.tv_nsec))); }