mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-29 09:40:10 +01:00
[Breaking] Change all time input parameters to milliseconds. (#78)
Changes all functions that accept a time parameter to use milliseconds instead of seconds. * Adds duration input to NimBLEDevice::startAdvertising and NimBLEServer::startAdvertising.
This commit is contained in:
@@ -170,10 +170,11 @@ NimBLEAdvertising* NimBLEDevice::getAdvertising() {
|
||||
|
||||
/**
|
||||
* @brief Convenience function to begin advertising.
|
||||
* @param [in] duration The duration in milliseconds to advertise for, default = forever.
|
||||
* @return True if advertising started successfully.
|
||||
*/
|
||||
bool NimBLEDevice::startAdvertising() {
|
||||
return getAdvertising()->start();
|
||||
bool NimBLEDevice::startAdvertising(uint32_t duration) {
|
||||
return getAdvertising()->start(duration);
|
||||
} // startAdvertising
|
||||
# endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user