Home | History | Annotate | Download | only in src
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2015 Google Inc.
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 #include <unistd.h>
     20 #include <sys/time.h>
     21 
     22 #include "btif/include/btif_debug.h"
     23 #include "btif/include/btif_debug_btsnoop.h"
     24 #include "btif/include/btif_debug_conn.h"
     25 #include "btif/include/btif_media.h"
     26 #include "include/bt_target.h"
     27 #include "osi/include/wakelock.h"
     28 
     29 void btif_debug_init(void) {
     30 #if defined(BTSNOOP_MEM) && (BTSNOOP_MEM == TRUE)
     31   btif_debug_btsnoop_init();
     32 #endif
     33 }
     34 
     35 // TODO: Find a better place for this to enable additional re-use
     36 uint64_t btif_debug_ts(void) {
     37   struct timeval tv;
     38   gettimeofday(&tv, NULL);
     39   return (tv.tv_sec * 1000000LL) + tv.tv_usec;
     40 }
     41