Initialization of the variable to store all logs incontroller
$rootScope. = {}; timeSlots
//Function to createwith object eventname start time, end time using , ID
$scope.logEvent = function(Eventid, EventName, isEnd){if ( isEnd == false) { $rootScope. timeSlots [ Eventid] = { "name ":EventName , "startDate ": new Date( ). getTime ( ) }; }else { $rootScope. timeSlots [ Eventid] ["endDate "] = new Date( ). getTime ( ); } };Log starting time
$scope. "function1" logEvent ( , "Function1 start Time", false);