How to use seconds() in mql5

hi

In mql4 for counting seconds from the start of the minutes
we have Seconds()
What is the equivalent of this function in mql5?

In other words, how can I have in a mql5 seconds in a minute?

int Seconds( const datetime time )
{
  return((int)time % 60);
}

Excuse me how should I use this code?

int Seconds( void )
{
  return((int)TimeCurrent() % 60);
}

void OnStart()
{
  Print(Seconds());
}

This is the equivalent function:

int SecondsMQL4()
{
   MqlDateTime tm;
   TimeCurrent(tm);
   return(tm.sec);
}

See here the complete guide “Migrating from MQL4 to MQL5”:
https://www.mql5.com/en/articles/81

1 Like

Thank you very much.