prendi il time di quando usa la funzione...

if((time() - $time_quando_ha_usato_la_funzione) < 86400)
{
echo "errore";
}