Create backend.c

Added set_heart_beat function with random hb option.