Use a multi_manager to trigger your sound, and then trigger it again after a 10 second delay. Be sure you don't have 'Not Toggled' set on your ambient_generic (it's off by default - leave it off). See Tutorial: Multi manager for more info on using multi_managers.
Probably I wrote something not correct before. I just want to set a playback time of a looping alarm sound without turning it off manually. I.e, player press a button, alarm starts playing, it sounds for a ten seconds and then turns off.
That's what Penguinboy meant. Your button should turn on the multi_manager. multi_manager can act like a timer to perform multiple tasks, first it turns on your ambient_generic immediately and then it turns it off after 10 seconds. If your ambient_generic is named "coolsound", then keyvalue pairs on your multimanager should look like this:
coolsound 0 coolsound#1 10
The #1 should appear by itself when you use a name more than once. Read the tutorial to learn more.