C-code->how to add micros() function?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

C-code->how to add micros() function?

Post by viktor_au »

Hello
I am trying to add a C-code from an Arduino IDE program.
It is a micros() function.
I have problem, as this function calls a cli() --( macro) that executes an assembler macro to disable interrupt.

Any help will be great.
Last edited by viktor_au on Tue Nov 29, 2022 7:22 am, edited 1 time in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: C-code->how to add micros() function?

Post by Benj »

Hello,

Looks like you can simply use the Timer component available under data->storage to do a similar thing and get the time in microseconds. Then no C code nessisary :D

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: C-code->how to add micros() function?

Post by viktor_au »

Well... It is one way to do it.
Another way is to use C-code..

Thanks Ben

Post Reply