Classical and relativistic models for time duration of gamma-ray bursts