
    The People of the State of Newt York, Respondent, v Frank Tinsley, Appellant.
   — Appeal by the defendant from a judgment of the Supreme Court, Kings County (O’Brien, J.), rendered April 25, 1984, convicting him of criminal sale of a controlled substance in the third degree (two counts), upon a jury verdict, and imposing sentence.

Ordered that the judgment is affirmed.

The defendant argues that the People failed to prove every element of the crimes of which he was convicted. Viewing the evidence in the light most favorable to the prosecution (see, People v Contes, 60 NY2d 620), we find that it was legally sufficient to establish the defendant’s guilt beyond a reasonable doubt. Moreover, upon the exercise of our factual review power, we are satisfied that the verdict of guilt was not against the weight of the evidence (CPL 470.15 [5]). An undercover police officer testified without contradiction that he made purchases of substances later found to contain heroin from the defendant on two occasions at the same apartment in Brooklyn. On each occasion, the officer viewed the seller, known to him as "Frankie”, for about 15 seconds. Shortly after the second purchase, the defendant was arrested at the apartment where the sale was made, and the prerecorded "buy” money paid to the defendant by the undercover officer was recovered from the apartment.

At trial, the defendant objected to the closing of the courtroom during the testimony of an undercover officer. At the hearing which preceded closure, the officer testified that he was still actively engaged in undercover work and was participating in operations in drug investigations in Kings County. The officer testified that a homicide had occurred in connectian with the drug activity under investigation and his life would be endangered by testifying in an open courtroom. Moreover, his exposure could jeopardize the ongoing investigations. Based on this testimony, the trial court did not abuse its discretion in closing the courtroom since compelling reasons to close the courtroom were clearly established (see, People v Jones, 47 NY2d 409, 414-415, cert denied 444 US 946; People v Glover, 57 NY2d 61, 65; People v Boucher, 112 AD2d 310, lv denied 66 NY2d 614).

The defendant contends that the People were not ready for trial within the time set forth in CPL 30.30. We do not agree. The total time chargeable to the People is well within the permitted six calendar months, after subtracting periods of delay directly resulting from the defendant’s pretrial motions (CPL 30.30 [4] [a]; see, People v Worley, 66 NY2d 523, 527; People v Pappas, 128 AD2d 556; People v Brown, 113 AD2d 812, lv denied 67 NY2d 649); adjournments at the defendant’s request (CPL 30.30 [4] [b]); delays resulting from the failure or the inability of the defendant or his counsel to appear (CPL 30.30 [4] [c], [d]); and delays to which the defendant consented by failing to object (CPL 30.30 [4] [b]). Moreover, the People cannot be charged with the postreadiness delay in producing a document requested by the defendant, since the People’s continuing readiness for trial was not affected, and, to the extent that the delay impeded the defendant’s readiness for trial, an alternative remedy was available to him (see, People v Anderson, 66 NY2d 529). Thus, the defendant’s motion to dismiss pursuant to CPL 30.30 was properly denied.

We have reviewed the defendant’s additional contentions and find them to be without merit. Lawrence, J. P., Eiber, Spatt and Balletta, JJ., concur.  