How to add progress bar for custom processes?

Hello there,

Just wondering how to include in a custom process the % progress bar (photo below) to monitor the progress of a script?
I have a script that takes about 15 mins to complete so it would be great to monitor its progress.

Many Thanks!


You can have a look at the function bst_progress: brainstorm3/bst_progress.m at master · brainstorm-tools/brainstorm3 · GitHub