How can I calculate the system time using custom code in MATLAB Coder 2.0 (R2011a) ?

3 visualizzazioni (ultimi 30 giorni)
I would like to calculate the current system time using a simple function call in my MATLAB function, that I use for generating C code. This can be utilized for calculation of system time and further used seamlessly for determining TIC-TOC time or the time taken for execution of a program.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 22 Ago 2019
The ability to include TIC-TOC functions within a MATLAB code is akin to calcualting the system time. This can be accomplished by creating a MATLAB wrapper function using the CODER.CEVAL property that allows us to utilize a C function within MATLAB code.
The files attached to this solution illustrate the method of using CODER.CEVAL to use a function defined in a C program that essentially uses [time.h] functions to calculate the system time.

Più risposte (0)

Categorie

Scopri di più su MATLAB Coder in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti


Release

R2011a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by