<commit_before>package service

import (
	"github.com/muka/go-bluetooth/api"
	"github.com/muka/go-bluetooth/bluez/profile/advertising"
)

func (app *App) GetAdvertisement() *advertising.LEAdvertisement1Properties {
	return app.advertisement
}

func (app *App) Advertise(timeout uint32) (func(), error) {

	adv := app.GetAdvertisement()

	adv.Timeout = uint16(timeout)
	adv.Duration = uint16(timeout)

	for _, svc := range app.GetServices() {
		adv.ServiceUUIDs = append(adv.ServiceUUIDs, svc.UUID)
	}

	cancel, err := api.ExposeAdvertisement(app.adapterID, adv, timeout)
	return cancel, err
}<commit_msg>remove timeout and duration from advertisement.<commit_after>package service

import (
	"github.com/muka/go-bluetooth/api"
	"github.com/muka/go-bluetooth/bluez/profile/advertising"
)

func (app *App) GetAdvertisement() *advertising.LEAdvertisement1Properties {
	return app.advertisement
}

func (app *App) Advertise(timeout uint32) (func(), error) {

	adv := app.GetAdvertisement()

	for _, svc := range app.GetServices() {
		adv.ServiceUUIDs = append(adv.ServiceUUIDs, svc.UUID)
	}

	cancel, err := api.ExposeAdvertisement(app.adapterID, adv, timeout)
	return cancel, err
}
{'fraction_non_alphanumeric': 0.13157894736842105, 'fraction_numerical': 0.008488964346349746, 'mean_word_length': 5.2712765957446805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5740983', 'n_tokens_mistral': 440, 'n_tokens_neox': 398, 'n_words': 81}