You can use chrono library inside S-Functions as long as the compiler you are using knows about those libraries. Check your compiler using
mex -setup C/C++
I am using Visual Studio Community 2019 compiler and it works for importing chrono inside s-functions.